diff --git a/.github/actions/run-playwright-smoke-tests/action.yml b/.github/actions/run-playwright-smoke-tests/action.yml index 3f0b0c82..6c969e9c 100644 --- a/.github/actions/run-playwright-smoke-tests/action.yml +++ b/.github/actions/run-playwright-smoke-tests/action.yml @@ -12,9 +12,25 @@ inputs: runs: using: composite steps: - - name: Run Playwright Smoke Tests - uses: ./.github/workflows/playwright.yml - if: success() || failure() + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - webapp_url: ${{ inputs.webapp_url }} - auth_secret: ${{ inputs.auth_secret }} \ No newline at end of file + node-version: lts/* + - name: Install dependencies + shell: bash + working-directory: ./tests/Dfe.EarlyYearsQualification.SmokeTests/playwright + run: npm ci + - name: Install Playwright Browsers + shell: bash + working-directory: ./tests/Dfe.EarlyYearsQualification.SmokeTests/playwright + run: npx playwright install --with-deps + - name: Run Playwright tests + shell: bash + working-directory: ./tests/Dfe.EarlyYearsQualification.SmokeTests/playwright + run: WEBAPP_URL=https://${{ inputs.webapp_name }}.azurewebsites.net AUTH_SECRET=${{ inputs.auth_secret }} npx playwright test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file