Initial commit #6
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| # Automatically stop old builds on the same branch/PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit-checks: | |
| name: Pre-commit Checks | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| # needed for 'pre-commit-mirrors-insert-license' | |
| fetch-depth: 0 | |
| - name: Set up pixi | |
| uses: prefix-dev/setup-pixi@0f64e482e3d251f735019b1bc7fb0413ead75b2c # v0.8.2 | |
| with: | |
| environments: default lint | |
| - name: Install repository | |
| run: pixi run -e default postinstall | |
| - name: pre-commit | |
| run: pixi run pre-commit-run --color=always --show-diff-on-failure | |
| unit-tests: | |
| name: Unit Tests (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }}) - ${{ matrix.environment }} | |
| timeout-minutes: 30 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| environment: [py311, py312, py313] | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v4 | |
| - name: Set up pixi | |
| uses: prefix-dev/setup-pixi@8eaba7c61d661f73d558b0b477156b7b62667fa4 | |
| with: | |
| environments: ${{ matrix.environment }} | |
| - name: Install repository | |
| run: pixi run -e ${{ matrix.environment }} postinstall | |
| - name: Run pytest | |
| run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes | |
| - name: Upload codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml |