feat: Add coverage package and update dependencies #2
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: Unit Test & Coverage | |
| on: | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| unit-test-coverage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| env: | |
| UV_VERSION: '0.9.27' | |
| PYTHON_VERSION: '3.13' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Restore uv caches | |
| id: cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.local/share/uv | |
| .venv | |
| key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }} | |
| restore-keys: | | |
| uv-main- | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| enable-cache: false | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run Unit Tests with Coverage | |
| run: | | |
| uv run -- pytest | |
| uv run -- coverage report --show-missing | |
| - name: Save uv caches | |
| if: steps.cache-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.local/share/uv | |
| .venv | |
| key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }} |