-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (47 loc) · 1.32 KB
/
pr.yaml
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
name: Checks
"on":
pull_request:
env:
PYTHON_VERSION_DEFAULT: "3.11.11"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "temurin"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Load cached venv
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
run: uv sync --all-groups
- name: Check dependencies
run: uv run deptry .
- name: Run tests
run: uv run pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false
verbose: true