Revert "Add covcode badge (#5)" (#6) #16
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 checks 🐍 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - movie_catalog/** | |
| jobs: | |
| run-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run ruff | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| version-file: 'pyproject.toml' | |
| - name: Run mypy | |
| run: uv run mypy movie_catalog | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - run-checks | |
| services: | |
| redis: | |
| image: redis | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run python tests | |
| run: uv run pytest | |
| env: | |
| TESTING: 1 | |
| REDIS_PORT: 6379 |