馃懛 Fix mypy and ty pre-commit hooks not using config from backend/pyproject.toml
#2077
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: Test Backend | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-backend: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version-file: .python-version | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| version: "latest-known" | |
| - run: docker compose down -v --remove-orphans | |
| - run: docker compose up -d --wait db mailpit | |
| - name: Migrate DB | |
| run: uv run bash scripts/prestart.sh | |
| working-directory: backend | |
| - name: Run tests | |
| run: uv run bash scripts/tests-start.sh "Coverage for ${{ github.sha }}" | |
| working-directory: backend | |
| - run: docker compose down -v --remove-orphans | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: coverage-html | |
| path: backend/htmlcov | |
| include-hidden-files: true | |
| - name: Coverage report | |
| run: uv run coverage report --fail-under=90 | |
| working-directory: backend |