From b3d3764f822250309906bf2934021cb267581ac1 Mon Sep 17 00:00:00 2001 From: Salima Hassouni <141415851+sahassou@users.noreply.github.com> Date: Mon, 13 May 2024 13:15:34 +0200 Subject: [PATCH] Dbp 757 playwright tests (#30) * DBP-757-add playwright_branch input variable * DBP-757-playwright_branch Input var should be optional --- .github/workflows/playwright.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b09d5f7..3e2a197 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,4 +1,5 @@ name: Playwright Tests + on: workflow_call: inputs: @@ -6,16 +7,27 @@ on: type: string description: 'Hostname of the frontend server (optional)' required: false + playwright_branch: + type: string + description: 'The name of the branch to be tested with Playwright.' + required: false + default: main workflow_dispatch: inputs: frontendHostname: type: string description: 'Hostname of the frontend server (optional)' + required: true + playwright_branch: + type: string + description: 'The name of the branch to be tested with Playwright.' required: false + default: main push: branches: [ main ] jobs: + run_playwright_end2end_tests: continue-on-error: true timeout-minutes: 60 @@ -27,16 +39,14 @@ jobs: - uses: actions/checkout@v3 with: repository: 'dBildungsplattform/schulportal-testautomatisierung' + ref: ${{ inputs.playwright_branch }} - uses: actions/setup-node@v3 with: node-version: 16 - - name: Remove Microsoft APT and Update Packages run: | sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update || true - - - name: Install dependencies run: npm ci - name: Install Playwright Browsers @@ -51,5 +61,4 @@ jobs: with: name: playwright-report path: playwright-report/ - retention-days: 30npm login - + retention-days: 30npm login \ No newline at end of file