add ruff formatting and minor improvements #3
Workflow file for this run
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 Coverage | |
on: push | |
jobs: | |
test-coverage: | |
env: | |
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
- name: Install uv | |
uses: astral-sh/[email protected] | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Restore uv cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ github.workspace }}/.cache/uv | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install dependencies | |
run: uv sync --all-extras --dev | |
#- name: Pyright typechecking | |
# uses: jakebailey/[email protected] | |
# with: | |
# version: 1.1.370 | |
# skip-unannotated: true | |
# level: error | |
- name: Run tests and check coverage | |
run: | | |
uv run pytest --cov=. --cov-fail-under=0 | |
- name: Minimize uv cache | |
run: uv cache prune --ci |