-
Notifications
You must be signed in to change notification settings - Fork 38
63 lines (51 loc) · 1.43 KB
/
test.yml
File metadata and controls
63 lines (51 loc) · 1.43 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
63
name: Run-tests
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest
- name: Run coverage
run: uv run coverage run -m pytest
- name: Create coverage reports
run: |
uv run coverage xml -o coverage.xml
uv run coverage report
uv run coverage html
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: cobertura
file: coverage.xml
flag-name: py${{ matrix.python-version }}
parallel: true
coveralls-finish:
needs: build
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Finish Coveralls parallel build
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true