updated CI/CD to use pixi #944
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
| name: Test | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| pull_request: | |
| branches: "*" | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.11", "3.13"] | |
| os: [ubuntu-latest, macos-latest] | |
| env: | |
| OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Pixi | |
| uses: prefix-dev/setup-pixi@v0.8.1 | |
| with: | |
| pixi-version: v0.34.0 | |
| cache: true | |
| - name: Install dependencies and run tests | |
| env: | |
| MPLBACKEND: agg | |
| PLATFORM: ${{ matrix.os }} | |
| DISPLAY: :42 | |
| run: | | |
| pixi run -e dev-py${{ matrix.python }} test | |
| - name: Archive figures generated during testing | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: visual_test_results_${{ matrix.os }}-python${{ matrix.python }} | |
| path: tests/figures/* | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| name: coverage | |
| verbose: true | |
| file: ./coverage.xml | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |