Allow safety failure #7
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 and lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Load cache | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }} | |
| - name: Install dependencies if cache does not exist | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: uv sync --locked --all-extras --dev | |
| - name: Check dependencies | |
| run: make check-dependencies | |
| - name: Check codestyle | |
| run: make check-codestyle | |
| - name: ruff | |
| run: make check-ruff-github | |
| - name: mypy | |
| run: make check-mypy | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Load cache | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }} | |
| - name: Install dependencies if cache does not exist | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run tests | |
| run: make test | |
| - name: Code Coverage Summary Report | |
| uses: irongut/[email protected] | |
| with: | |
| filename: reports/coverage.xml | |
| badge: true | |
| format: 'markdown' | |
| output: 'both' | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md | |
| - name: Add Coverage Report to Job Summary | |
| run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY |