-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.6 KB
/
coverage.yml
File metadata and controls
62 lines (52 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Run tests and upload coverage
on: push
permissions:
contents: read
jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: 'true'
activate-environment: "true"
python-version: "3.13"
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests with coverage
run: uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy
- name: Run Mypy
run: uv run mypy src --cobertura-xml-report mypy_report
- name: Upload mypy coverage
uses: codecov/codecov-action@v5
if: "!cancelled()"
with:
files: ./mypy_report/cobertura.xml
flags: mypy
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
fail_ci_if_error: 'true'
- name: Upload pytest cov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
files: ./junit.xml
flags: pytest
slug: ${{ github.repository }}
fail_ci_if_error: 'true'
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
files: ./junit.xml
report_type: test_results
slug: ${{ github.repository }}
fail_ci_if_error: 'true'
token: ${{ secrets.CODECOV_TOKEN }}