@@ -224,37 +224,34 @@ jobs:
224224 if : inputs.IMPORT
225225 timeout-minutes : 45
226226 steps :
227- - name : run playwright
228- run : |
229- # wait until FE stabilizes a bit
230- sleep 3m
231-
232- curl -H "Accept: application/vnd.github.everest-preview+json" \
233- -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
234- --request POST \
235- https://api.github.com/repos/dataquest-dev/\
236- dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \
237- --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
238-
239- # wait for it to start
240- sleep 30s
227+ - name : Checkout Playwright tests
228+ uses : actions/checkout@v4
229+ with :
230+ repository : dataquest-dev/dspace-ui-tests
231+ path : dspace-ui-tests
232+ token : ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
241233
242- # get result of last job
243- 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+ - name : Checkout main repository
235+ uses : actions/checkout@v4
236+ with :
237+ path : this-repository
244238
245- # while job did not finish, sleep
246- while [[ $RES == 'null' ]]; do
247- sleep 10s
248- 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)
249- done;
239+ - name : Copy customer config to UI tests repository for merging
240+ run : |
241+ cp this-repository/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/
250242
251- echo $RES
252- # if last result is not success, return -1 and fail
253- if [[ $RES != \"success\" ]]; then
243+ - name : test
244+ working-directory : dspace-ui-tests/scripts
245+ env :
246+ HOME_URL : https://dev-5.pc:8443/repository/
247+ NAME : LINDAT
248+ run : |
249+ ./test.sh
254250
255- echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository"
256- exit 1
257- fi;
251+ - uses : mazoea/ga-maz/end@master
252+ with :
253+ CHOWN_DIR : ./
254+ if : ${{ always() }}
258255
259256 rest-tests-after-import8 :
260257 runs-on : ubuntu-latest
0 commit comments