Changes build-system to hatch #123
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: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[test] | |
| - name: Lint with ruff | |
| run: | | |
| pip install ruff | |
| # stop the build if there are Python syntax errors or undefined names | |
| ruff --format=github --select=E9,F63,F7,F82 --target-version=py38 . | |
| # default set of ruff rules with GitHub Annotations | |
| ruff --format=github --target-version=py38 . | |
| continue-on-error: true | |
| - name: Test with pytest | |
| run: pytest tests --doctest-modules --junitxml=reports/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }} | |
| path: reports/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml | |
| # Use always() to always run this step to publish test results when there are test failures | |
| if: ${{ always() }} | |
| - name: Report test results | |
| uses: dorny/test-reporter@v2 | |
| if: success() || failure() # run this step even if the previous step failed | |
| with: | |
| name: JEST Tests | |
| path: reports/test-results-*-*.xml | |
| reporter: jest-junit |