Skip to content

Tests

Tests #346

Workflow file for this run

name: Tests
on:
push:
pull_request:
schedule:
- cron: "0 6 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: uv sync --locked
- name: Check lockfile
run: uv lock --check
- name: Check code style
run: |
uv run ruff check --output-format=github
uv run ruff format --check
- name: Execute tests
run: |
uv run pytest --cov portion
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}