-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (40 loc) · 1.13 KB
/
test.yml
File metadata and controls
49 lines (40 loc) · 1.13 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
name: Tests
on:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install 3.11
- name: Install dependencies
run: uv sync --group dev
- name: Run tests with coverage
run: uv run coverage run -m pytest tests/ -v
- name: Generate coverage report
run: |
uv run coverage report --format=markdown > coverage.md
uv run coverage report --fail-under=85
uv run coverage xml
- name: Add coverage comment to PR
uses: MishaKav/pytest-coverage-comment@main
if: github.event_name == 'pull_request'
with:
pytest-xml-coverage-path: ./coverage.xml
coverage-path-prefix: src/
title: Coverage Report
badge-title: Coverage
hide-badge: false
hide-report: false
create-new-comment: false
hide-comment: false
report-only-changed-files: false
remove-link-from-badge: false