-
Notifications
You must be signed in to change notification settings - Fork 782
37 lines (34 loc) · 1.13 KB
/
test.yaml
File metadata and controls
37 lines (34 loc) · 1.13 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
# This workflow runs pytest unit tests and code coverage reporting on push and pull requests to the main branch.
# It tests against multiple Python versions and operating systemsto ensure compatibility. The workflow uses Codecov
# for coverage reporting, and the results are uploaded to Codecov using a secret token.
name: Test
on:
pull_request: # any branch
types: [opened, synchronize, reopened]
push:
branches: [main]
env:
FORCE_COLOR: 1
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Unit test
run: |
uv run coverage run -m pytest tests/
- name: Run codecov
run: |
uv run codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}