55 push :
66 branches : ["main", "rc-*"]
77 pull_request :
8+ merge_group :
89 release :
910 types : [published]
1011 schedule :
1112 - cron : " 0 8 * * *"
1213
1314jobs :
14- build :
15+ check :
1516 runs-on : ubuntu-latest
1617 strategy :
1718 matrix :
2122 fail-fast : false
2223
2324 steps :
24- - uses : actions/checkout@v3
25+ - uses : actions/checkout@v4
2526 - name : Setup py-shiny
2627 id : install
2728 uses : ./.github/py-shiny/setup
@@ -58,16 +59,24 @@ jobs:
5859 fail-fast : false
5960
6061 steps :
61- - uses : actions/checkout@v3
62+ - uses : actions/checkout@v4
6263 - name : Setup py-shiny
6364 uses : ./.github/py-shiny/setup
6465 with :
6566 python-version : ${{ matrix.python-version }}
6667
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 }}'
6776 - name : Run End-to-End tests
6877 timeout-minutes : 20
6978 run : |
70- make playwright-shiny SUB_FILE=". -vv"
79+ make playwright-shiny SUB_FILE=". -vv" ${{ steps.browsers.outputs.browsers }}
7180 - uses : actions/upload-artifact@v4
7281 if : failure()
7382 with :
@@ -85,14 +94,14 @@ jobs:
8594 fail-fast : false
8695
8796 steps :
88- - uses : actions/checkout@v3
97+ - uses : actions/checkout@v4
8998 - name : Setup py-shiny
9099 uses : ./.github/py-shiny/setup
91100 with :
92101 python-version : ${{ matrix.python-version }}
93102
94103 - name : Install node.js
95- uses : actions/setup-node@v3
104+ uses : actions/setup-node@v4
96105 with :
97106 node-version : " 18"
98107 cache : npm
@@ -102,10 +111,15 @@ jobs:
102111 run : |
103112 npm ci
104113
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') }}
105119 - name : Run example app tests
106120 timeout-minutes : 20
107121 run : |
108- make playwright-examples SUB_FILE=". -vv"
122+ make playwright-examples SUB_FILE=". -vv" ${{ steps.browsers.outputs.browsers }}
109123 - uses : actions/upload-artifact@v4
110124 if : failure()
111125 with :
@@ -124,7 +138,7 @@ jobs:
124138 fail-fast : false
125139
126140 steps :
127- - uses : actions/checkout@v3
141+ - uses : actions/checkout@v4
128142 - name : Setup py-shiny
129143 uses : ./.github/py-shiny/setup
130144 with :
@@ -146,7 +160,7 @@ jobs:
146160
147161 playwright-deploys :
148162 needs : [playwright-deploys-precheck]
149- 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'))
150164 # Only allow one `playwright-deploys` job to run at a time. (Independent of branch / PR)
151165 # Only one is allowed to run at a time because it is deploying to the same server location.
152166 concurrency : playwright-deploys
@@ -159,7 +173,7 @@ jobs:
159173 fail-fast : false
160174
161175 steps :
162- - uses : actions/checkout@v3
176+ - uses : actions/checkout@v4
163177 - name : Setup py-shiny
164178 uses : ./.github/py-shiny/setup
165179 with :
@@ -172,7 +186,7 @@ jobs:
172186 run : |
173187 make playwright-deploys SUB_FILE=". -vv"
174188
175- - name : Deploy apps and run tests (on `push` or on `pull_request` w/ ` deploy**` branch )
189+ - name : Deploy apps and run tests (on `push` or ` deploy**` branches )
176190 env :
177191 DEPLOY_APPS : " true"
178192 DEPLOY_CONNECT_SERVER_URL : " https://rsc.radixu.com/"
@@ -197,9 +211,9 @@ jobs:
197211 name : " Deploy to PyPI"
198212 runs-on : ubuntu-latest
199213 if : github.event_name == 'release'
200- needs : [build ]
214+ needs : [check ]
201215 steps :
202- - uses : actions/checkout@v3
216+ - uses : actions/checkout@v4
203217 - name : " Set up Python 3.10"
204218 uses : actions/setup-python@v4
205219 with :
@@ -233,7 +247,7 @@ jobs:
233247
234248 testrail-reporting-nightly :
235249 runs-on : ${{ matrix.os }}
236- 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') }}
237251 strategy :
238252 matrix :
239253 python-version :
@@ -246,14 +260,14 @@ jobs:
246260 fail-fast : false
247261
248262 steps :
249- - uses : actions/checkout@v3
263+ - uses : actions/checkout@v4
250264 - name : Setup py-shiny
251265 uses : ./.github/py-shiny/setup
252266 with :
253267 python-version : ${{ matrix.python-version }}
254268
255269 - name : Install node.js
256- uses : actions/setup-node@v3
270+ uses : actions/setup-node@v4
257271 with :
258272 node-version : " 18"
259273 cache : npm
0 commit comments