-
Notifications
You must be signed in to change notification settings - Fork 28
91 lines (73 loc) · 2.35 KB
/
check.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
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
84
85
86
87
88
89
90
91
name: Checks
on: [pull_request]
jobs:
test:
name: Run tests with ${{ matrix.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
env:
# uncomment when upgrade grpcio-tools, current version does not work with 3.13
# - "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
os:
- ubuntu-latest
# - macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
# Install a specific version of uv.
version: "0.5.8"
enable-cache: true
# - name: Install Python
# run: uv python install --python-preference only-managed ${{ matrix.env }}
# - name: Install dependencies
# run: uv sync --all-groups
- name: Install tox
run: uv tool install --python-preference only-managed --python ${{ matrix.env }} tox --with tox-uv --with tox-gh@.
- name: Install Python
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Run test suite
run: uv run tox
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
check:
name: Run ${{ matrix.env }} checks on ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
env:
- "lint"
- "format"
- "type"
python-version:
- "3.12"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
# Install a specific version of uv.
version: "0.5.8"
enable-cache: true
# - name: Install Python
# run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Install tox
run: uv tool install --python-preference only-managed --python ${{ matrix.python-version }} tox --with tox-uv --with tox-gh@.
- name: Install Python ${{ matrix.python-version }}
run: uv python install --python-preference only-managed ${{ matrix.python-version }}
- name: Run ${{ matrix.env }}
run: uv run tox
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}