DEV/CI: use Pixi for examples, notebooks, and xp-tests #1528
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defaults: | |
| run: | |
| shell: bash -leo pipefail {0} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| name: "CI" | |
| jobs: | |
| test: | |
| name: Test ${{ matrix.os }} (${{ join(matrix.tasks, ' ') }}) | |
| strategy: | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| tasks: [[test-numba, test-finch, test-mlir]] | |
| environments: [[test, finch, mlir]] | |
| include: | |
| - os: ubuntu-latest | |
| tasks: [test-numba, test-finch, test-mlir, test-numba-mindeps, test-finch-mindeps, test-mlir-mindeps] | |
| environments: [mindeps, test, finch, mlir] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.63.2 | |
| cache: true | |
| environments: ${{ join(matrix.environments, ' ') }} | |
| - name: hack for setuptools-scm | |
| run: pixi build | |
| - name: Run tests | |
| run: | | |
| for task in ${{ join(matrix.tasks, ' ') }}; do | |
| pixi run "$task" | |
| done | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./**/coverage*.xml | |
| examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.63.2 | |
| cache: true | |
| environments: examples | |
| - name: Run examples | |
| run: pixi run test-examples-ci | |
| notebooks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.63.2 | |
| cache: true | |
| environments: notebooks | |
| - name: Run notebooks | |
| run: pixi run test-notebooks-ci | |
| array_api_tests: | |
| name: ${{ matrix.task }} | |
| strategy: | |
| matrix: | |
| task: ['xp-tests-numba', 'xp-tests-finch'] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.63.2 | |
| cache: true | |
| - name: Run the test suite | |
| run: pixi run ${{ matrix.task }} | |
| on: | |
| # Trigger the workflow on push or pull request, | |
| # but only for the main branch | |
| push: | |
| branches: | |
| - main | |
| - vnext | |
| pull_request: | |
| branches: | |
| - main | |
| - vnext | |
| # Also trigger on page_build, as well as release created events | |
| page_build: | |
| release: | |
| types: # This configuration does not affect the page_build event above | |
| - created |