Skip to content

GOATS-757: Add pre-commit and run on all files. (#340) #794

GOATS-757: Add pre-commit and run on all files. (#340)

GOATS-757: Add pre-commit and run on all files. (#340) #794

Workflow file for this run

name: Run Tests
on:
pull_request:
paths:
- "src/**/*.py"
- "tests/unit/**/*.py"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/run_tests.yaml"
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: uv.lock
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --locked --dev --group github
- name: Run tests and calculate coverage
run: |
uv run pytest -r A -v -n auto --cov=src --cov-report=xml --cov=tests --cov-branch
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}