π§ Update lefthook configuration for improved linting and pre-commit jβ¦ #5
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] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: π¨ Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.2 | |
| with: | |
| environments: lint | |
| - name: π§Ή Execute lint | |
| run: pixi run -e lint lint | |
| checks: | |
| name: Test π ${{ matrix.environment }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| environment: [test-py310, test-py313] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: check out repo | |
| uses: actions/checkout@v5 | |
| - name: π¨ Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.2 | |
| with: | |
| environments: ${{ matrix.environment }} | |
| - name: π§ͺ Execute pytest | |
| env: | |
| pytest_github_report: true | |
| run: pixi run -e ${{ matrix.environment }} test --cov-report xml | |
| - name: π¦ Disambiguate coverage filename by environment and OS | |
| run: mv .coverage ".coverage.${{ matrix.environment }}.${{ matrix.os }}.xml" | |
| - name: π€ Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |