Skip to content

Merge pull request #1 from tryolabs/feature/add-uv-project-and-packag… #8

Merge pull request #1 from tryolabs/feature/add-uv-project-and-packag…

Merge pull request #1 from tryolabs/feature/add-uv-project-and-packag… #8

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/checkout@v4.2.1
- name: Install uv
uses: astral-sh/setup-uv@v3.1.7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@v5.2.0
with:
python-version-file: "pyproject.toml"
- name: Restore uv cache
uses: actions/cache@v4.1.2
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/pyright-action@v2.3.2
# 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