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
39 changes: 39 additions & 0 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Playwright tests

on:
workflow_dispatch:
workflow_call:

jobs:
playwright-tests:
runs-on: dspace-test-1
timeout-minutes: 45
steps:
- 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 }}

- name: Checkout main repository
uses: actions/checkout@v4
with:
path: this-repository

- 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/

- name: test
working-directory: dspace-ui-tests/scripts
env:
HOME_URL: https://dev-5.pc:8443/repository/
NAME: LINDAT
run: |
./test.sh

- uses: mazoea/ga-maz/end@master
with:
CHOWN_DIR: ./
if: ${{ always() }}
30 changes: 30 additions & 0 deletions .github/workflows/trigger-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Trigger UI Tests for All Customer Branches

on:
workflow_dispatch:
workflow_call:
schedule:
- cron: '0 5 * * *'

permissions:
actions: write # Grants permission to trigger workflows
contents: read # Access to repository contents

jobs:
trigger-builds:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get and Trigger Customer Branch UI Tests
run: |
# Authenticate with GitHub CLI using the token
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token

git fetch --prune origin
BRANCHES=$(git ls-remote --heads origin | awk -F'/' '{print $3"/"$4}' | grep '^customer/')
for branch in $(echo "$BRANCHES" | sed -e 's/[\[\]"]//g' -e 's/,/\n/g'); do
echo "Triggering UI tests for branch: $branch"
gh workflow run playwright-tests.yml --ref $branch
done