Skip to content

Lock file maintenance #569

Lock file maintenance

Lock file maintenance #569

Workflow file for this run

name: Test
on:
# pull-request events are not triggered when a PR is merged
# push events are not triggered when a PR created from a fork repository
# So we need both to run tests on every PR and after merging
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable caching
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install dependencies
run: uv sync
- name: Lint
run: uv run poe check
- name: Check Python version
run: |
actual_version=$(uv run python --version)
expected_version="Python ${{ matrix.python }}"
if [ "$actual_version" == *"$expected_version"* ]; then
echo "Expected $expected_version, but got $actual_version"
exit 1
fi
- name: Test
run: uv run poe test
- name: Coverage
run: uv run poe coverage-xml
- name: Upload coverage report to Codecov
if: matrix.python == '3.13'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true