-
Notifications
You must be signed in to change notification settings - Fork 54
52 lines (43 loc) · 1.36 KB
/
test.yml
File metadata and controls
52 lines (43 loc) · 1.36 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
name: Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
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 }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync
- name: Run tests with coverage
run: uv run pytest --cov=toon_format --cov-report=xml --cov-report=term --cov-report=html --cov-fail-under=85
- name: Upload coverage reports as artifact
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.12'
with:
name: coverage-reports
path: |
coverage.xml
htmlcov/
retention-days: 30
- name: Coverage comment on PR
uses: py-cov-action/python-coverage-comment-action@v3
if: matrix.python-version == '3.12' && github.event_name == 'pull_request'
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 85