Skip to content

GOATS-985 GOATS-987: Build payload for creating ToO. (#467) #279

GOATS-985 GOATS-987: Build payload for creating ToO. (#467)

GOATS-985 GOATS-987: Build payload for creating ToO. (#467) #279

Workflow file for this run

name: Python CI
on:
pull_request:
paths:
- "src/**/*.py"
- "tests/**/*.py"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/python_ci.yaml"
push:
branches:
- main
jobs:
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run linter
uses: astral-sh/ruff-action@v3
with:
version-file: "pyproject.toml"
format:
name: Check format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check format
uses: astral-sh/ruff-action@v3
with:
args: "format --check"
version-file: "pyproject.toml"
tests:
name: Run tests
needs: [lint, format]
runs-on: [ubuntu-latest]
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
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 }}
- name: Minimize uv cache
run: uv cache prune --ci