Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/setup-pixi/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Setup Pixi Environment'
description: 'Sets up pixi with common configuration'
inputs:
environments:
description: 'Pixi environments to setup'
required: false
default: 'dev'
activate-environment:
description: 'Environment to activate'
required: false
default: 'dev'
run-install:
description: 'Whether to run install'
required: false
default: 'true'
cache:
description: 'Whether to use cache'
required: false
default: 'false'
post-cleanup:
description: 'Whether to run post cleanup'
required: false
default: 'false'

runs:
using: 'composite'
steps:
- uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: ${{ inputs.environments }}
activate-environment: ${{ inputs.activate-environment }}
run-install: ${{ inputs.run-install }}
cache: ${{ inputs.cache }}
post-cleanup: ${{ inputs.post-cleanup }}
9 changes: 2 additions & 7 deletions .github/workflows/documentation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ jobs:
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: dev
activate-environment: dev
run-install: true
cache: false
post-cleanup: false
- name: Setup Pixi
uses: ./.github/actions/setup-pixi

- name: Build documentation
run: pixi run docs-build
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: dev
activate-environment: dev
run-install: true
cache: false
post-cleanup: false

- name: Setup Pixi
uses: ./.github/actions/setup-pixi
- name: Run linting
run: pixi run lint
- name: Suggestion to fix issues
Expand All @@ -48,19 +42,18 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: prefix-dev/setup-pixi@v0.9.0
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: dev
activate-environment: dev
run-install: true
run-install: false
cache: false
post-cleanup: false

- name: Set Python version
run: pixi add python=${{ matrix.python-version }}

- name: Install dependencies and run tests
run: pixi run test
run: pixi run -e dev test

- name: Upload coverage
uses: codecov/codecov-action@v4.0.1
Expand All @@ -80,13 +73,8 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: dev
activate-environment: dev
run-install: true
cache: false
post-cleanup: false
- name: Setup Pixi
uses: ./.github/actions/setup-pixi

- name: Build package
run: pixi run build
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: prefix-dev/setup-pixi@v0.9.0
with:
environments: dev
activate-environment: dev
run-install: true
cache: false
post-cleanup: false
- name: Setup Pixi
uses: ./.github/actions/setup-pixi

- name: Build package
run: pixi run build
Expand Down
Loading