Skip to content

Tests

Tests #276

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 dependencies
run: |
pip install pip -U
pip install .
- name: Install test dependencies
run: pip install .[test]
- name: Check code style
run: |
ruff check --output-format=github
ruff format --check
- name: Execute tests
run: coverage run --source portion -m pytest
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}