1
1
name : " python tests and coverage"
2
2
# Uses:
3
- # https://github.com/actions/setup-python : v5.6.0 a26af69be951a213d495a4c3e4e4022e16d87065
4
3
# https://github.com/actions/checkout : v4.2.2 11bd71901bbe5b1630ceea73d27597364c9af683
5
4
# https://github.com/actions/download-artifact : v5.0.0 634f93cb2916e3fdff6788551b99b062d0335ce0
6
5
# https://github.com/actions/upload-artifact : v4.6.2 ea165f8d65b6e75b540449e92b4886f43607fa02
14
13
branches :
15
14
- " main"
16
15
17
- env :
18
- UV_PYTHON_PREFERENCE : " only-system"
19
-
20
16
jobs :
21
- settings :
22
- runs-on : " ubuntu-latest"
23
- name : " Define workflow settings"
24
- steps :
25
- - name : " Repo checkout"
26
- uses : " actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
27
-
28
- - name : " Define settings"
29
- run : |
30
- echo "python_version=$(<.python-version)" >> $GITHUB_OUTPUT
31
-
32
17
run-tests-and-coverage :
33
18
name : " Run nox for tests and coverage"
34
- needs : " settings"
35
19
runs-on : " ${{ matrix.os }}"
36
20
strategy :
37
21
fail-fast : false
51
35
- name : " Repo checkout"
52
36
uses : " actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
53
37
54
- - name : " Set up Python ${{ matrix.python-version }}"
55
- uses : " actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065"
56
- with :
57
- python-version : " ${{ matrix.python-version }}"
58
- allow-prereleases : true
59
-
60
38
- name : " Install the latest version of uv"
61
39
uses : " astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc"
62
40
with :
65
43
enable-cache : true
66
44
67
45
- name : " Run tests and coverage via nox"
68
- run : " uvx nox --session test -- partial-coverage no-config "
46
+ run : " uvx nox --session test -- partial-coverage"
69
47
70
48
- name : " Save coverage artifact"
71
49
uses : " actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02"
@@ -77,22 +55,16 @@ jobs:
77
55
78
56
coverage-compile :
79
57
name : " coverage compile"
80
- needs : ["settings", " run-tests-and-coverage"]
58
+ needs : " run-tests-and-coverage"
81
59
runs-on : " ubuntu-latest"
82
60
steps :
83
61
- name : " Repo checkout"
84
62
uses : " actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
85
63
86
- - name : " Set up Python"
87
- uses : " actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065"
88
- with :
89
- python-version : ${{ steps.settings.outputs.python_version }}
90
-
91
64
- name : " Install the latest version of uv"
92
65
uses : " astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc"
93
66
with :
94
67
version : " latest"
95
- python-version : ${{ steps.settings.outputs.python_version }}
96
68
enable-cache : true
97
69
98
70
- name : " Download coverage artifacts"
@@ -117,22 +89,15 @@ jobs:
117
89
118
90
linters-and-formatters :
119
91
name : " linters and formatters"
120
- needs : " settings"
121
92
runs-on : " ubuntu-latest"
122
93
steps :
123
94
- name : " Repo checkout"
124
95
uses : " actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
125
96
126
- - name : " Set up Python"
127
- uses : " actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065"
128
- with :
129
- python-version : ${{ steps.settings.outputs.python_version }}
130
-
131
97
- name : " Install the latest version of uv"
132
98
uses : " astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc"
133
99
with :
134
100
version : " latest"
135
- python-version : ${{ steps.settings.outputs.python_version }}
136
101
enable-cache : true
137
102
138
103
- name : " Run linters and formatters"
0 commit comments