Skip to content

Fixing homepage broken image #5

Fixing homepage broken image

Fixing homepage broken image #5

name: Deploy - UI Tests
on:
pull_request:
branches:
- main
workflow_call:
inputs:
deploy_url:
type: string
required: true
tests_to_run:
type: string
required: true
env:
deploy_url: ${{ inputs.deploy_url || 'https://app-sswwebsite-9eb3-pr-2363.azurewebsites.net/'}}
tests_to_run: ${{ inputs.tests_to_run || 'images'}}
jobs:
test:
name: Run Playwright tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium webkit
- name: Check that ${{ env.deploy_url }} is running
uses: jtalk/url-health-check-action@v4
with:
url: ${{ env.deploy_url }}
max-attempts: 12
retry-delay: 10s
- name: Run Playwright tests
run: npx playwright test ${{ env.tests_to_run }}
env:
HOST_URL: ${{ env.deploy_url }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 2