From 4bc3119c462cde0bab6dc4706e9f6f0fb074a9e6 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 4 Mar 2026 14:11:27 +0100 Subject: [PATCH 1/4] Refactor running rest tests in deploy --- .github/workflows/deploy.yml | 70 ++++++------------------------------ 1 file changed, 10 insertions(+), 60 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 951a56d570c..3e23b37d2bf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -200,37 +200,12 @@ jobs: secrets: inherit rest-tests-after-deploy8: - runs-on: ubuntu-latest needs: playwright-after-deploy8 - timeout-minutes: 120 - steps: - - name: run rest-tests - run: | - curl -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ - --request POST \ - https://api.github.com/repos/dataquest-dev/\ - dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \ - --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null - - # wait for it to start - sleep 30s - - # get result of last job - 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) - - # while job did not finish, sleep - while [[ $RES == 'null' ]]; do - sleep 10s - 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) - done; - - echo $RES - # if last result is not success, return -1 and fail - if [[ $RES != \"success\" ]]; then - echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository" - exit 1 - fi; + uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master + with: + CUSTOMER: ${{ github.ref_name }} + URL: http://dev-5.pc:8${{ inputs.INSTANCE }}/repository/server/api + secrets: inherit playwright-after-import8: @@ -240,34 +215,9 @@ jobs: secrets: inherit rest-tests-after-import8: - runs-on: ubuntu-latest needs: playwright-after-import8 - timeout-minutes: 120 - steps: - - name: run rest-tests - run: | - curl -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ - --request POST \ - https://api.github.com/repos/dataquest-dev/\ - dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \ - --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null - - # wait for it to start - sleep 30s - - # get result of last job - 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) - - # while job did not finish, sleep - while [[ $RES == 'null' ]]; do - sleep 10s - 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) - done; - - echo $RES - # if last result is not success, return -1 and fail - if [[ $RES != \"success\" ]]; then - echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository" - exit 1 - fi; + uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master + with: + CUSTOMER: ${{ github.ref_name }} + URL: http://dev-5.pc:8${{ inputs.INSTANCE }}/repository/server/api + secrets: inherit From d175c4a5555d447d45e6736537b9d791aa206e2e Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 4 Mar 2026 14:24:35 +0100 Subject: [PATCH 2/4] Commented playwright for testing --- .github/workflows/deploy.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3e23b37d2bf..57e2895fb05 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -193,14 +193,16 @@ jobs: echo "dspace healthcheck:" docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v" - playwright-after-deploy8: - needs: deploy-8 - if: '!inputs.IMPORT' - uses: ./.github/workflows/playwright-tests.yml - secrets: inherit + # playwright-after-deploy8: + # needs: deploy-8 + # if: '!inputs.IMPORT' + # uses: ./.github/workflows/playwright-tests.yml + # secrets: inherit rest-tests-after-deploy8: - needs: playwright-after-deploy8 + # needs: playwright-after-deploy8 + needs: deploy-8 + if: '!inputs.IMPORT' uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master with: CUSTOMER: ${{ github.ref_name }} From dcce53cb55fcbd3e5e6232a10f277180f7564d4d Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 4 Mar 2026 14:49:15 +0100 Subject: [PATCH 3/4] Removed dynamic string interpolation from URL --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57e2895fb05..68ed80b316d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -206,10 +206,9 @@ jobs: uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master with: CUSTOMER: ${{ github.ref_name }} - URL: http://dev-5.pc:8${{ inputs.INSTANCE }}/repository/server/api + URL: http://dev-5.pc:88/repository/server/api secrets: inherit - playwright-after-import8: needs: import-8 if: inputs.IMPORT @@ -221,5 +220,5 @@ jobs: uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master with: CUSTOMER: ${{ github.ref_name }} - URL: http://dev-5.pc:8${{ inputs.INSTANCE }}/repository/server/api + URL: http://dev-5.pc:88/repository/server/api secrets: inherit From 24717a5d62341bb1836b6cd9c690b952b1bc392c Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Mon, 9 Mar 2026 10:55:42 +0100 Subject: [PATCH 4/4] Allows running playwright tests again --- .github/workflows/deploy.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 68ed80b316d..befb653c9cd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -193,15 +193,14 @@ jobs: echo "dspace healthcheck:" docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v" - # playwright-after-deploy8: - # needs: deploy-8 - # if: '!inputs.IMPORT' - # uses: ./.github/workflows/playwright-tests.yml - # secrets: inherit + playwright-after-deploy8: + needs: deploy-8 + if: '!inputs.IMPORT' + uses: ./.github/workflows/playwright-tests.yml + secrets: inherit rest-tests-after-deploy8: - # needs: playwright-after-deploy8 - needs: deploy-8 + needs: playwright-after-deploy8 if: '!inputs.IMPORT' uses: dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@master with: