-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (35 loc) · 1.07 KB
/
test.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
35
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }} && uv python pin ${{ matrix.python-version }}
- name: Install dependencies
run: uv venv && uv sync
- name: Run tests
run: |
source .venv/bin/activate
uv run pytest --junitxml=junit/report.xml --cov=.
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: "junit/report.xml"
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml