5
5
push :
6
6
branches : ["main", "rc-*"]
7
7
pull_request :
8
+ merge_group :
8
9
release :
9
10
types : [published]
10
11
schedule :
11
12
- cron : " 0 8 * * *"
12
13
13
14
jobs :
14
- build :
15
+ check :
15
16
runs-on : ubuntu-latest
16
17
strategy :
17
18
matrix :
21
22
fail-fast : false
22
23
23
24
steps :
24
- - uses : actions/checkout@v3
25
+ - uses : actions/checkout@v4
25
26
- name : Setup py-shiny
26
27
id : install
27
28
uses : ./.github/py-shiny/setup
@@ -33,25 +34,20 @@ jobs:
33
34
run : |
34
35
make check-tests
35
36
36
- - name : Type check with pyright
37
+ - name : Type check
37
38
if : steps.install.outcome == 'success' && (success() || failure())
38
39
run : |
39
40
make check-types
40
41
41
- - name : Lint with flake8
42
+ - name : Lint code
42
43
if : steps.install.outcome == 'success' && (success() || failure())
43
44
run : |
44
45
make check-lint
45
46
46
- - name : black
47
+ - name : Verify code formatting
47
48
if : steps.install.outcome == 'success' && (success() || failure())
48
49
run : |
49
- make check-black
50
-
51
- - name : isort
52
- if : steps.install.outcome == 'success' && (success() || failure())
53
- run : |
54
- make check-isort
50
+ make check-format
55
51
56
52
playwright-shiny :
57
53
runs-on : ${{ matrix.os }}
@@ -63,16 +59,24 @@ jobs:
63
59
fail-fast : false
64
60
65
61
steps :
66
- - uses : actions/checkout@v3
62
+ - uses : actions/checkout@v4
67
63
- name : Setup py-shiny
68
64
uses : ./.github/py-shiny/setup
69
65
with :
70
66
python-version : ${{ matrix.python-version }}
71
67
68
+ - name : Determine browsers for testing
69
+ uses : ./.github/py-shiny/pytest-browsers
70
+ id : browsers
71
+ with :
72
+ all-browsers : ${{ startsWith(github.head_ref, 'playwright') }}
73
+ - name : Display browser
74
+ shell : bash
75
+ run : echo '${{ steps.browsers.outputs.browsers }}'
72
76
- name : Run End-to-End tests
73
77
timeout-minutes : 20
74
78
run : |
75
- make playwright-shiny SUB_FILE=". -vv"
79
+ make playwright-shiny SUB_FILE=". -vv" ${{ steps.browsers.outputs.browsers }}
76
80
- uses : actions/upload-artifact@v4
77
81
if : failure()
78
82
with :
@@ -90,14 +94,14 @@ jobs:
90
94
fail-fast : false
91
95
92
96
steps :
93
- - uses : actions/checkout@v3
97
+ - uses : actions/checkout@v4
94
98
- name : Setup py-shiny
95
99
uses : ./.github/py-shiny/setup
96
100
with :
97
101
python-version : ${{ matrix.python-version }}
98
102
99
103
- name : Install node.js
100
- uses : actions/setup-node@v3
104
+ uses : actions/setup-node@v4
101
105
with :
102
106
node-version : " 18"
103
107
cache : npm
@@ -107,10 +111,15 @@ jobs:
107
111
run : |
108
112
npm ci
109
113
114
+ - name : Determine browsers for testing
115
+ uses : ./.github/py-shiny/pytest-browsers
116
+ id : browsers
117
+ with :
118
+ all-browsers : ${{ startsWith(github.head_ref, 'playwright') }}
110
119
- name : Run example app tests
111
120
timeout-minutes : 20
112
121
run : |
113
- make playwright-examples SUB_FILE=". -vv"
122
+ make playwright-examples SUB_FILE=". -vv" ${{ steps.browsers.outputs.browsers }}
114
123
- uses : actions/upload-artifact@v4
115
124
if : failure()
116
125
with :
@@ -129,7 +138,7 @@ jobs:
129
138
fail-fast : false
130
139
131
140
steps :
132
- - uses : actions/checkout@v3
141
+ - uses : actions/checkout@v4
133
142
- name : Setup py-shiny
134
143
uses : ./.github/py-shiny/setup
135
144
with :
@@ -142,9 +151,16 @@ jobs:
142
151
run : |
143
152
make playwright-deploys SUB_FILE=". -vv"
144
153
154
+ - uses : actions/upload-artifact@v4
155
+ if : failure()
156
+ with :
157
+ name : " playright-examples-${{ matrix.os }}-${{ matrix.python-version }}-results"
158
+ path : test-results/
159
+ retention-days : 5
160
+
145
161
playwright-deploys :
146
162
needs : [playwright-deploys-precheck]
147
- if : github.event_name != 'release' && (github.event_name == 'push' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'deploy') ))
163
+ if : github.event_name != 'release' && (github.event_name == 'push' || startsWith(github.head_ref, 'deploy'))
148
164
# Only allow one `playwright-deploys` job to run at a time. (Independent of branch / PR)
149
165
# Only one is allowed to run at a time because it is deploying to the same server location.
150
166
concurrency : playwright-deploys
@@ -157,7 +173,7 @@ jobs:
157
173
fail-fast : false
158
174
159
175
steps :
160
- - uses : actions/checkout@v3
176
+ - uses : actions/checkout@v4
161
177
- name : Setup py-shiny
162
178
uses : ./.github/py-shiny/setup
163
179
with :
@@ -170,8 +186,7 @@ jobs:
170
186
run : |
171
187
make playwright-deploys SUB_FILE=". -vv"
172
188
173
- - name : Deploy apps and run tests (on `push` or on `pull_request` w/ `deploy**` branch)
174
- if : ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'deploy')) }}
189
+ - name : Deploy apps and run tests (on `push` or `deploy**` branches)
175
190
env :
176
191
DEPLOY_APPS : " true"
177
192
DEPLOY_CONNECT_SERVER_URL : " https://rsc.radixu.com/"
@@ -196,9 +211,9 @@ jobs:
196
211
name : " Deploy to PyPI"
197
212
runs-on : ubuntu-latest
198
213
if : github.event_name == 'release'
199
- needs : [build ]
214
+ needs : [check ]
200
215
steps :
201
- - uses : actions/checkout@v3
216
+ - uses : actions/checkout@v4
202
217
- name : " Set up Python 3.10"
203
218
uses : actions/setup-python@v4
204
219
with :
@@ -232,7 +247,7 @@ jobs:
232
247
233
248
testrail-reporting-nightly :
234
249
runs-on : ${{ matrix.os }}
235
- if : ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'testrail') ) }}
250
+ if : ${{ github.event_name == 'schedule' || startsWith(github.head_ref, 'testrail') }}
236
251
strategy :
237
252
matrix :
238
253
python-version :
@@ -245,14 +260,14 @@ jobs:
245
260
fail-fast : false
246
261
247
262
steps :
248
- - uses : actions/checkout@v3
263
+ - uses : actions/checkout@v4
249
264
- name : Setup py-shiny
250
265
uses : ./.github/py-shiny/setup
251
266
with :
252
267
python-version : ${{ matrix.python-version }}
253
268
254
269
- name : Install node.js
255
- uses : actions/setup-node@v3
270
+ uses : actions/setup-node@v4
256
271
with :
257
272
node-version : " 18"
258
273
cache : npm
0 commit comments