-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.26 KB
/
tests.yml
File metadata and controls
54 lines (42 loc) · 1.26 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
name: Tests
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --python ${{ matrix.python-version }}
- name: Run tests
run: uv run pytest tests/ -v --tb=short
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-html-${{ matrix.python-version }}
path: htmlcov/
- name: Generate coverage badge
if: github.ref == 'refs/heads/main'
run: uv run genbadge coverage -i coverage.xml -o coverage.svg
- name: Commit coverage badge
if: github.ref == 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update coverage badge [skip ci]"
file_pattern: coverage.svg
skip_dirty_check: false