@@ -133,46 +133,15 @@ jobs:
133133 docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v"
134134
135135 playwright-after-deploy8 :
136- runs-on : ubuntu-latest
137136 needs : deploy-8
138- timeout-minutes : 15
139137 if : ' !inputs.IMPORT'
140- steps :
141- - name : run playwright
142- run : |
143- # wait until FE stabilizes a bit
144- sleep 3m
145-
146- curl -H "Accept: application/vnd.github.everest-preview+json" \
147- -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
148- --request POST \
149- https://api.github.com/repos/dataquest-dev/\
150- dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \
151- --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
152-
153- # wait for it to start
154- sleep 30s
155-
156- # get result of last job
157- RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
158-
159- # while job did not finish, sleep
160- while [[ $RES == 'null' ]]; do
161- sleep 10s
162- RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
163- done;
164-
165- echo $RES
166- # if last result is not success, return -1 and fail
167- if [[ $RES != \"success\" ]]; then
168- echo "playwright tests have failed! check appropriate action run"
169- exit 1
170- fi;
138+ uses : ./.github/workflows/playwright-tests.yml
139+ secrets : inherit
171140
172141 rest-tests-after-deploy8 :
173142 runs-on : ubuntu-latest
174143 needs : playwright-after-deploy8
175- timeout-minutes : 15
144+ timeout-minutes : 45
176145 steps :
177146 - name : run rest-tests
178147 run : |
@@ -204,47 +173,16 @@ jobs:
204173
205174
206175 playwright-after-import8 :
207- runs-on : ubuntu-latest
208176 needs : import-8
209177 if : inputs.IMPORT
210- timeout-minutes : 15
211- steps :
212- - name : run playwright
213- run : |
214- # wait until FE stabilizes a bit
215- sleep 3m
216-
217- curl -H "Accept: application/vnd.github.everest-preview+json" \
218- -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
219- --request POST \
220- https://api.github.com/repos/dataquest-dev/\
221- dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \
222- --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
223-
224- # wait for it to start
225- sleep 30s
226-
227- # get result of last job
228- RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
229-
230- # while job did not finish, sleep
231- while [[ $RES == 'null' ]]; do
232- sleep 10s
233- RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
234- done;
235-
236- echo $RES
237- # if last result is not success, return -1 and fail
238- if [[ $RES != \"success\" ]]; then
239-
240- echo "playwright tests have failed! check appropriate action run"
241- exit 1
242- fi;
178+ uses : ./.github/workflows/playwright-tests.yml
179+ secrets : inherit
180+
243181
244182 rest-tests-after-import8 :
245183 runs-on : ubuntu-latest
246184 needs : playwright-after-import8
247- timeout-minutes : 15
185+ timeout-minutes : 45
248186 steps :
249187 - name : run rest-tests
250188 run : |
0 commit comments