.E2E #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .E2E | |
env: | |
deployment_name: pay-transparency | |
on: | |
workflow_dispatch: | |
secrets: | |
E2E_USERNAME: | |
required: true | |
E2E_PASSWORD: | |
required: true | |
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY: | |
required: true | |
inputs: | |
frontend-url: | |
description: "Frontend URL of the application" | |
required: true | |
type: string | |
external-api-base-url : | |
description: "Base URL to the external service API" | |
required: true | |
type: string | |
environment: | |
description: "Environment to read secrets from GitHub secrets" | |
required: false | |
default: dev | |
type: string | |
timeout-minutes: | |
description: 'Timeout minutes' | |
default: 8 | |
required: false | |
type: number | |
workflow_call: | |
secrets: | |
E2E_USERNAME: | |
required: true | |
E2E_PASSWORD: | |
required: true | |
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY: | |
required: true | |
inputs: | |
frontend-url: | |
description: "Frontend URL of the application" | |
required: true | |
type: string | |
environment: | |
description: "Environment to read secrets from GitHub secrets" | |
required: false | |
default: dev | |
type: string | |
external-api-base-url : | |
description: "Base URL to the external service API" | |
required: true | |
type: string | |
timeout-minutes: | |
description: 'Timeout minutes' | |
default: 8 | |
required: false | |
type: number | |
jobs: | |
end-to-end: | |
name: Tests | |
environment: ${{ inputs.environment }} | |
defaults: | |
run: | |
working-directory: frontend | |
runs-on: ubuntu-22.04 | |
timeout-minutes: ${{ inputs.timeout-minutes }} | |
strategy: | |
max-parallel: 3 | |
matrix: | |
project: [chromium, Google Chrome, firefox, safari, Microsoft Edge] | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- uses: actions/setup-node@v4 | |
name: Setup Node | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
npm ci | |
npx playwright install --with-deps | |
- name: Run Tests | |
env: | |
E2E_BASE_URL: ${{ inputs.frontend-url }} | |
E2E_USERNAME: ${{ secrets.E2E_USERNAME }} | |
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }} | |
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY: ${{ secrets.EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY }} | |
EXTERNAL_API_BASE_URL: ${{ inputs.external-api-base-url }} | |
run: | | |
npx playwright test --project="${{ matrix.project }}" --reporter=html | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
name: upload results | |
env: | |
PW_TEST_HTML_REPORT_OPEN: always | |
with: | |
name: playwright-report-${{ matrix.project }} | |
path: "./frontend/playwright-report" # path from current folder | |
retention-days: 7 | |