8
8
- ' **'
9
9
pull_request : {}
10
10
11
+ env :
12
+ CI : true
13
+ COLUMNS : 120
14
+ UV_PYTHON : 3.12
15
+ UV_FROZEN : ' 1'
16
+
11
17
jobs :
12
18
server-lint :
13
19
runs-on : ubuntu-latest
14
20
15
21
steps :
16
- - uses : actions/checkout@v3
22
+ - uses : actions/checkout@v4
17
23
18
- - uses : actions/setup-node@v3
24
+ - uses : actions/setup-node@v4
19
25
with :
20
26
node-version : ' 18.x'
21
27
@@ -27,89 +33,83 @@ jobs:
27
33
runs-on : ubuntu-latest
28
34
29
35
steps :
30
- - uses : actions/checkout@v3
36
+ - uses : actions/checkout@v4
31
37
32
- - uses : actions /setup-python@v4
38
+ - uses : astral-sh /setup-uv@v5
33
39
with :
34
- python-version : ' 3.11'
35
-
36
- - name : install
37
- run : |
38
- pip install -U pip
39
- pip install -r requirements/cli.txt
40
+ enable-cache : true
40
41
41
- - run : make lint
42
- working-directory : cli
43
- - run : make mypy
42
+ - run : uv sync
44
43
working-directory : cli
45
44
45
+ - uses : pre-commit/action@v3.0.0
46
+ with :
47
+ extra_args : --all-files --verbose
48
+ env :
49
+ SKIP : lint-js
50
+
46
51
cli-test :
47
52
name : cli-test-${{ matrix.os }}-py${{ matrix.python-version }}
48
53
strategy :
49
54
fail-fast : false
50
55
matrix :
51
56
os : [ubuntu, macos]
52
- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ']
57
+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12', '3.13 ']
53
58
54
59
runs-on : ${{ matrix.os }}-latest
60
+ env :
61
+ UV_PYTHON : ${{ matrix.python-version }}
55
62
56
63
steps :
57
- - uses : actions/checkout@v3
64
+ - uses : actions/checkout@v4
58
65
59
- - name : set up python
60
- uses : actions/setup-python@v4
66
+ - uses : astral-sh/setup-uv@v5
61
67
with :
62
- python-version : ${{ matrix.python-version }}
63
-
64
- - name : install
65
- run : |
66
- pip install -U pip
67
- pip install -r requirements/cli.txt
68
- - run : pip freeze
68
+ enable-cache : true
69
69
70
- - name : test
71
- working-directory : cli
72
- run : make test
70
+ - run : mkdir coverage
73
71
74
- - name : rename coverage
72
+ - run : uv run coverage run -m pytest
75
73
working-directory : cli
76
- run : |
77
- mkdir coverage
78
- mv .coverage coverage/.coverage.${{ matrix.os }}-py${{ matrix.python-version }}
74
+ env :
75
+ COVERAGE_FILE : ../coverage/.coverage.${{ matrix.os }}-py${{ matrix.python-version }}
79
76
80
77
- name : store coverage files
81
- uses : actions/upload-artifact@v3
78
+ uses : actions/upload-artifact@v4
82
79
with :
83
- name : coverage
84
- path : cli/coverage
80
+ name : coverage-${{ matrix.os }}-py${{ matrix.python-version }}
81
+ path : coverage
82
+ include-hidden-files : true
85
83
86
84
cli-coverage-check :
87
85
# dogfooding! use smokeshow to view our coverage report
88
86
needs : [cli-test]
89
87
runs-on : ubuntu-latest
90
88
91
89
steps :
92
- - uses : actions/checkout@v3
90
+ - uses : actions/checkout@v4
93
91
94
- - uses : actions /setup-python@v4
92
+ - uses : astral-sh /setup-uv@v5
95
93
with :
96
- python-version : ' 3.11 '
94
+ enable-cache : true
97
95
98
96
- name : get coverage files
99
- uses : actions/download-artifact@v2
97
+ uses : actions/download-artifact@v4
100
98
with :
101
- name : coverage
99
+ merge-multiple : true
102
100
path : cli
103
101
104
- - run : pip install coverage smokeshow
102
+ - run : uv sync
103
+ working-directory : cli
105
104
106
105
- name : build coverage
107
- working-directory : cli
108
106
run : |
109
- coverage combine
110
- coverage html -i
107
+ uv run coverage combine
108
+ uv run coverage html -i
109
+ working-directory : cli
111
110
112
- - run : smokeshow upload cli/htmlcov
111
+ - run : uv run -m smokeshow upload htmlcov
112
+ working-directory : cli
113
113
env :
114
114
SMOKESHOW_GITHUB_STATUS_DESCRIPTION : CLI Coverage {coverage-percentage}
115
115
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD : 90
@@ -122,7 +122,7 @@ jobs:
122
122
environment : cloudflare-staging-deploy
123
123
124
124
steps :
125
- - uses : actions/checkout@v3
125
+ - uses : actions/checkout@v4
126
126
127
127
- uses : cloudflare/wrangler-action@v3
128
128
with :
@@ -153,7 +153,7 @@ jobs:
153
153
environment : cloudflare-production-deploy
154
154
155
155
steps :
156
- - uses : actions/checkout@v3
156
+ - uses : actions/checkout@v4
157
157
158
158
- uses : cloudflare/wrangler-action@v3
159
159
with :
@@ -176,27 +176,21 @@ jobs:
176
176
id-token : write
177
177
178
178
steps :
179
- - uses : actions/checkout@v3
179
+ - uses : actions/checkout@v4
180
180
181
- - name : set up python
182
- uses : actions/setup-python@v4
181
+ - uses : astral-sh/setup-uv@v5
183
182
with :
184
- python-version : ' 3.11 '
183
+ enable-cache : true
185
184
186
- - name : install
187
- run : pip install -U build
188
-
189
- - name : check version
190
- id : check-version
191
- uses : samuelcolvin/check-python-version@v4
185
+ - name : check GITHUB_REF matches package version
186
+ uses : samuelcolvin/check-python-version@v4.1
192
187
with :
193
- version_file_path : ' cli/smokeshow/version.py '
188
+ version_file_path : ' cli/pyproject.toml '
194
189
195
- - name : build
196
- working-directory : cli
197
- run : python -m build
190
+ - run : uv build
198
191
199
- - name : Upload package to PyPI
192
+ - name : Publish to PyPI
200
193
uses : pypa/gh-action-pypi-publish@release/v1
201
194
with :
195
+ skip-existing : true
202
196
packages-dir : cli/dist/
0 commit comments