Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 25 additions & 27 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,41 +150,39 @@ jobs:
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v"

playwright-after-deploy8:
runs-on: ubuntu-latest
runs-on: dspace-test-1
needs: deploy-8
timeout-minutes: 45
if: '!inputs.IMPORT'
steps:
- name: run playwright
run: |
# wait until FE stabilizes a bit
sleep 3m

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-ui-tests/actions/workflows/cron-test.yml/dispatches \
--data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
- name: Checkout Playwright tests
uses: actions/checkout@v4
with:
repository: dataquest-dev/dspace-ui-tests
path: dspace-ui-tests
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}

# wait for it to start
sleep 30s
- name: Checkout main repository
uses: actions/checkout@v4
with:
path: this-repository

# 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-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
- name: Copy customer config to UI tests repository for merging
run: |
cp this-repository/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/

# 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-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
done;
- name: test
working-directory: dspace-ui-tests/scripts
env:
HOME_URL: https://dev-5.pc:8443/repository/
NAME: LINDAT
run: |
./test.sh

echo $RES
# if last result is not success, return -1 and fail
if [[ $RES != \"success\" ]]; then
echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository"
exit 1
fi;
- uses: mazoea/ga-maz/end@master
with:
CHOWN_DIR: ./
if: ${{ always() }}

rest-tests-after-deploy8:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions config/config.lindat.ui.tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"locators": {
"title": "LINDAT/CLARIAH-CZ Repository Home"
},
"urls": {
"oaipmh_response": "https://dev-5.pc:8443/repository/server/oai/request?verb=ListRecords&metadataPrefix=oai_dc",
"redirect_to_login": "https://dev-5.pc:8443/repository/login?redirectUrl=http:%2F%2Fdev-5.pc:82%2Fhome",
"not_exposed_data": "https://dev-5.pc:8443/repository/server/oai/request?verb=GetRecord&metadataPrefix=cmdi&identifier=oai:dev-5.pc:20.500.12800/1-4740"
}
}