refactor #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: Python Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| - name: Prepare environment | |
| run: | | |
| cp .env.example .env | |
| - name: Run tests | |
| run: | | |
| uv run pytest | |
| - name: Run linting | |
| run: | | |
| uv run ruff check . | |
| - name: Run formatting check | |
| run: | | |
| uv run ruff format --check . | |
| - name: Run type checking | |
| run: | | |
| uv run mypy . | |