typing (#74) #355
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: Run tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.14"] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| UV_PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - &clone | |
| uses: actions/checkout@v7 | |
| with: | |
| filter: blob:none | |
| fetch-depth: 0 | |
| - &uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| enable-cache: true | |
| - &hatch | |
| name: Install Hatch | |
| # https://github.com/pypa/hatch/pull/2351 | |
| run: uv tool install git+https://github.com/pypa/hatch.git@af5339a1a5bb8e6d4b659c4c1bfff8e7e37cdaff | |
| - name: Run test suite | |
| run: hatch test -py ${{ matrix.python-version }} -v --color=yes | |
| types: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - *clone | |
| - *uv | |
| - *hatch | |
| - name: Type check | |
| run: hatch check types | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - *clone | |
| - *uv | |
| - name: Build and check | |
| run: | | |
| uv build | |
| uvx twine check dist/*.whl | |
| check: | |
| if: always() | |
| needs: | |
| - build | |
| - test | |
| - types | |
| runs-on: ubuntu-latest | |
| steps: | |
| # https://github.com/marketplace/actions/alls-green#why | |
| - uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |