-
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (65 loc) · 2.06 KB
/
python.yaml
File metadata and controls
83 lines (65 loc) · 2.06 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Python CI
on:
push:
paths:
- ".github/workflows/python.yaml"
- "pyproject.toml"
- "**/pyproject.toml"
- "**/*.py"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --group dev --group tests
- name: Check formatting
run: uv run ruff format --check .
- name: Run ruff
run: uv run ruff check --output-format=github .
- name: Run mypy
run: uv run mypy .
- name: Run ty
run: uv run ty check --output-format=github .
test:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --group tests
- name: Run tests
run: uv run coverage run -m pytest --tb=long --junitxml=junit.xml -o junit_family=legacy
- name: Create coverage report
if: ${{ !cancelled() }}
run: uv run coverage xml
- name: Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
report_type: coverage
use_oidc: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
report_type: test_results
use_oidc: true