Add Lichess integration #159
This file contains 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 Suite | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
pull-requests: write | |
env: | |
DJANGO_SETTINGS_MODULE: "project.settings.test" | |
jobs: | |
tests: | |
name: "Code quality and tests checks" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: Set up uv | |
# Install a specific uv version using the installer | |
run: "curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh" | |
env: | |
UV_VERSION: "0.4.4" | |
- name: Set up Python | |
run: uv python install | |
- name: "Install dependencies via uv" | |
run: uv sync --all-extras | |
- name: "Run linting checks: Ruff checker" | |
run: uv run ruff format --check --quiet src/ | |
- name: "Run linting checks: Ruff linter" | |
run: uv run ruff check --quiet src/ | |
- name: "Run linting checks: Mypy" | |
run: uv run mypy src/ | |
- name: "Check that Django DB migrations are up to date" | |
run: uv run python manage.py makemigrations | grep "No changes detected" | |
- name: "Run tests" | |
# TODO: progressively increase minimum coverage to something closer to 80% | |
run: uv run pytest --cov=src --cov-report xml:coverage.xml | |
# --cov-fail-under=60 --> we'll actually do that with the "Report coverage" step | |
- name: "Report coverage" | |
# @link https://github.com/orgoro/coverage | |
uses: "orgoro/coverage@v3.1" | |
continue-on-error: true | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
thresholdAll: 0.6 |