Test, lint and typecheck #75
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: Library test, lint and typecheck | |
| run-name: Test, lint and typecheck | |
| on: [push] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: 3.9 | |
| - run: uv sync | |
| - name: Lint with Ruff | |
| run: uv run ./lint | |
| - name: Test with pytest | |
| run: uv run ./test | |
| - name: Typecheck with ty | |
| run: uv run ./typecheck | |
| - name: Check project version | |
| uses: maybe-hello-world/pyproject-check-version@v4 | |
| id: versioncheck | |
| with: | |
| pyproject-path: "./pyproject.toml" | |
| - name: Publish the pypi project | |
| if: steps.versioncheck.outputs.local_version_is_higher == 'true' | |
| run: uv build && uv publish -t ${{ secrets.PYPI_TOKEN }} |