Skip to content

fix(ci): regenerate uv.lock during release to prevent sync failures #15

fix(ci): regenerate uv.lock during release to prevent sync failures

fix(ci): regenerate uv.lock during release to prevent sync failures #15

Workflow file for this run

name: Run tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- run: uv sync --locked --all-extras --dev
- name: Run tests with coverage
if: matrix.python-version == '3.13'
run: uv run pytest tests/ --cov=package_name --cov-report=html --cov-report=xml
- name: Run tests without coverage
if: matrix.python-version != '3.13'
run: uv run pytest tests/
- name: Generate coverage badge
if: matrix.python-version == '3.13'
run: uv run genbadge coverage -i coverage.xml -o coverage-badge.svg
- name: Upload coverage HTML report
if: matrix.python-version == '3.13'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
- name: Upload coverage badge
if: matrix.python-version == '3.13'
uses: actions/upload-artifact@v4
with:
name: coverage-badge
path: coverage-badge.svg