-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (47 loc) · 1.34 KB
/
Copy pathpython-tests.yml
File metadata and controls
54 lines (47 loc) · 1.34 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
name: pythontests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pytest:
name: pytest
strategy:
max-parallel: 2
matrix:
python-version: [3.9]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: |
uv venv
uv sync
- name: Run pytest
run: |
. .venv/bin/activate
coverage run --omit='./tests/**/*' --source=. -m pytest -vv --durations=10
- name: Create coverage xml
if: ${{ github.ref == 'refs/heads/main' && matrix.python-version == 3.9 }}
run: |
. .venv/bin/activate
coverage xml
- name: Upload coverage to Codecov
if: ${{ github.ref == 'refs/heads/main' && matrix.python-version == 3.9 && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: false