-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 928 Bytes
/
ci.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
36
37
38
39
40
name: Tests
on:
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --all-groups
- name: Run tests for PR
run: |
uv run pytest --cov-config=.coveragerc --cov=.
uv run coverage xml
- name: Get Cover
if: github.event_name == 'pull_request'
uses: orgoro/coverage@v3.2
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.98
- name: Run coverage report
if: github.event_name != 'pull_request'
run: uv run coverage report