Skip to content

[pre-commit.ci] pre-commit autoupdate #166

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #166

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: ['**']
pull_request:
branches: [master]
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.11'
sync-args: --resolution=lowest
- python-version: '3.14'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up python
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Install dependencies
run: uv sync --group test ${{ matrix.sync-args }}
- name: Test with pytest
run: uv run --no-sync pytest
coverage:
name: Combine & check coverage
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
python-version: '3.14'
activate-environment: true
enable-cache: true
prune-cache: false
cache-suffix: covcheck
- run: uv sync --group covcheck
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: clump_tracker_coverage_data-*
merge-multiple: true
- name: Check coverage
run: |
coverage run --parallel-mode -m pytest --color=yes
coverage combine
coverage html --skip-covered --skip-empty
coverage report --skip-covered --format=markdown >> "$GITHUB_STEP_SUMMARY"
coverage report --fail-under=100
- name: Upload HTML report if check failed.
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: clump_tracker_coverage_report
path: htmlcov
if: ${{ failure() }}