-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (51 loc) · 1.47 KB
/
Copy pathpython-test.yml
File metadata and controls
62 lines (51 loc) · 1.47 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
name: Run Python Tests
on:
pull_request:
push:
branches:
- master
permissions:
contents: read
pull-requests: write
checks: write
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Install uv
id: setup-uv
uses: astral-sh/setup-uv@v7
with:
version: latest
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: List installed packages (uv demonstration)
run: uv pip list
- name: Run tests and collect coverage
run: |
uv run pytest --cov=pyasstosrt tests/ --cov-report=xml --cov-report=term --junit-xml=./test-results/junit.xml
shell: bash
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
env_vars: OS,PYTHON
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: success() || failure() # always run even if the previous step fails
with:
report_paths: './test-results/junit.xml'