Skip to content

Commit 64900cf

Browse files
author
Matus Kasak
committed
Uncommented rest tests
1 parent 1fe7f49 commit 64900cf

File tree

1 file changed

+35
-43
lines changed

1 file changed

+35
-43
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ jobs:
155155
timeout-minutes: 45
156156
if: '!inputs.IMPORT'
157157
steps:
158-
- name: Check runner
159-
run: echo "Self-hosted runner dspace-test-1 is now running this job"
160158
- name: Checkout Playwright tests
161159
uses: actions/checkout@v4
162160
with:
@@ -165,24 +163,18 @@ jobs:
165163
path: dspace-ui-tests
166164
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
167165

168-
- name: After checkout playwright
169-
run: |
170-
echo "UI Tests were checkouted, needs to copy json now"
171-
ls -la dspace-ui-tests
172-
173166
- name: Checkout main repository
174167
uses: actions/checkout@v4
175168
with:
176-
path: main-repo
169+
path: this-repository
177170

178-
- name: Copy config to UI tests repository
171+
- name: Copy customer config to UI tests repository for merging
179172
run: |
180-
cp main-repo/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/
173+
cp this-repository/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/
181174
182175
- name: test
183176
working-directory: dspace-ui-tests/scripts
184177
env:
185-
PLAYWRIGHT_ARTIFACTS_DIR: /tmp/playwright-artifacts
186178
HOME_URL: https://dev-5.pc:8443/repository/
187179
NAME: DEFAULT
188180
run: |
@@ -195,38 +187,38 @@ jobs:
195187
CHOWN_DIR: ./
196188
if: ${{ always() }}
197189

198-
# rest-tests-after-deploy8:
199-
# runs-on: ubuntu-latest
200-
# needs: playwright-after-deploy8
201-
# timeout-minutes: 45
202-
# steps:
203-
# - name: run rest-tests
204-
# run: |
205-
# curl -H "Accept: application/vnd.github.everest-preview+json" \
206-
# -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
207-
# --request POST \
208-
# https://api.github.com/repos/dataquest-dev/\
209-
# dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \
210-
# --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
211-
212-
# # wait for it to start
213-
# sleep 30s
214-
215-
# # get result of last job
216-
# 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-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
217-
218-
# # while job did not finish, sleep
219-
# while [[ $RES == 'null' ]]; do
220-
# sleep 10s
221-
# 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-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
222-
# done;
223-
224-
# echo $RES
225-
# # if last result is not success, return -1 and fail
226-
# if [[ $RES != \"success\" ]]; then
227-
# echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository"
228-
# exit 1
229-
# fi;
190+
rest-tests-after-deploy8:
191+
runs-on: ubuntu-latest
192+
needs: playwright-after-deploy8
193+
timeout-minutes: 45
194+
steps:
195+
- name: run rest-tests
196+
run: |
197+
curl -H "Accept: application/vnd.github.everest-preview+json" \
198+
-H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
199+
--request POST \
200+
https://api.github.com/repos/dataquest-dev/\
201+
dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \
202+
--data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
203+
204+
# wait for it to start
205+
sleep 30s
206+
207+
# get result of last job
208+
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-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
209+
210+
# while job did not finish, sleep
211+
while [[ $RES == 'null' ]]; do
212+
sleep 10s
213+
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-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
214+
done;
215+
216+
echo $RES
217+
# if last result is not success, return -1 and fail
218+
if [[ $RES != \"success\" ]]; then
219+
echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository"
220+
exit 1
221+
fi;
230222
231223
232224
playwright-after-import8:

0 commit comments

Comments
 (0)