Skip to content

Merge pull request #31 from msamsami/bump-deps #52

Merge pull request #31 from msamsami/bump-deps

Merge pull request #31 from msamsami/bump-deps #52

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
paths:
- "src/fastapi_maintenance/**"
- "tests/**"
- ".github/workflows/coverage.yml"
- "pyproject.toml"
- "uv.lock"
workflow_call:
workflow_dispatch:
env:
UV_SYSTEM_PYTHON: 1
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --all-extras --all-groups
- run: mkdir coverage
- name: Run tests with coverage
run: |
uv run coverage run -m pytest tests
uv run coverage combine
uv run coverage report
uv run coverage xml
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py
CONTEXT: ${{ runner.os }}-py
- name: Store coverage XML
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
include-hidden-files: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
slug: msamsami/fastapi-maintenance
fail_ci_if_error: true