Update actions/checkout action to v6 #68
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| workflow_call: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install dependencies | |
| run: uv pip install -e ".[dev]" | |
| - name: Run linting | |
| run: make lint | |
| - name: Run type checking | |
| run: make typecheck | |
| - name: Run security checks | |
| run: make security | |
| - name: Run tests with coverage | |
| run: | | |
| uv run pytest tests/ --cov=src --cov-report=term --cov-report=xml --cov-report=html | |
| - name: Upload coverage reports | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| - name: Check coverage threshold | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| run: | | |
| uv run python -c " | |
| import xml.etree.ElementTree as ET | |
| tree = ET.parse('coverage.xml') | |
| root = tree.getroot() | |
| coverage = float(root.attrib['line-rate']) * 100 | |
| print(f'Coverage: {coverage:.2f}%') | |
| if coverage < 90: | |
| print(f'Coverage {coverage:.2f}% is below 90% threshold') | |
| exit(1) | |
| " |