-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 990 Bytes
/
pytest.yml
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
name: Tests
on: [push]
jobs:
tests:
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install UV
run: astral-sh/setup-uv@v5
python-version: ${{ matrix.python-version }}
- uses: astral-sh/ruff-action@v3
- name: Run the tests
run: pytest --cov --cov-report=json:coverage.json tests/
- name: Extract coverage
run: echo "total=$(cat coverage.json | jq -r '.totals.percent_covered_display')" >> $GITHUB_ENV
- name: "Make badge"
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: 88ae1c5c4c732ba28346b3fac87b44a3
filename: covbadge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}