Merge pull request #167 from AustralianBioCommons/fix-approval-email-url #737
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: Lint and Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| AUTH0_DOMAIN: "mock-domain" | |
| AUTH0_AUDIENCE: "mock-audience" | |
| AUTH0_MANAGEMENT_ID: "mock-id" | |
| AUTH0_MANAGEMENT_SECRET: "mock-secret" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.13 | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Create virtual environment and install dependencies | |
| run: | | |
| uv venv | |
| uv sync --extra dev | |
| - name: Run Ruff (lint) | |
| run: | | |
| uv run -- ruff check . | |
| - name: Run tests and generate Cobertura coverage report | |
| run: | | |
| mkdir -p coverage | |
| PYTHONPATH=. uv run pytest \ | |
| --cov \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:coverage/cobertura.xml \ | |
| --cov-fail-under=80 \ | |
| --cov-report=html:coverage/html | |
| - name: Code Coverage Report | |
| uses: irongut/[email protected] | |
| with: | |
| filename: coverage/cobertura.xml | |
| badge: true | |
| fail_below_min: true | |
| format: markdown | |
| hide_branch_rate: true | |
| hide_complexity: true | |
| indicators: true | |
| output: console | |
| thresholds: '80 80' |