-
Notifications
You must be signed in to change notification settings - Fork 41
73 lines (70 loc) · 2.5 KB
/
Copy pathe2e-browser.yml
File metadata and controls
73 lines (70 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: End-to-end Tests (Browser)
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-browser:
# Ensure we timeout reasonably quickly:
timeout-minutes: 30
runs-on: ubuntu-latest
# Use the official Playwright image so the browsers and their system
# dependencies are pre-installed, avoiding the slow (and flaky) timeouts of
# `npx playwright install --with-deps`. The tag must be kept in sync with the
# @playwright/test version in package.json.
container:
image: mcr.microsoft.com/playwright:v1.62.1-noble
# GitHub Actions overrides $HOME inside containers, but the Playwright image
# runs as root. Firefox refuses to launch unless $HOME is owned by the
# current user, so pin it back to /root.
env:
HOME: /root
environment:
name: ${{ matrix.environment-name }}
strategy:
matrix:
environment-name: ["ESS PodSpaces"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
# install
- run: npm ci --ignore-scripts
# build
- run: npm run build
# setup
# test
- # Dependabot cannot access secrets, so it doesn't have a token to authenticate to ESS.
# We want jobs in this workflow to be gating PRs, so the whole matrix must
# run even for dependabot so that the matrixed jobs are skipped, instead
# of the whole pipeline.
if: ${{ github.actor != 'dependabot[bot]' }}
run: npm run test:e2e:browser
env:
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
E2E_TEST_POD: ${{ secrets.E2E_TEST_POD }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
E2E_TEST_USER: ${{ secrets.E2E_TEST_USER }}
E2E_TEST_PASSWORD: ${{ secrets.E2E_TEST_PASSWORD }}
- name: Archive browser-based end-to-end test request logs
uses: actions/upload-artifact@v7
if: failure()
continue-on-error: true
with:
name: playwright-output
path: test-results/
check:
if: always()
needs:
- e2e-browser
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
with:
allowed-skips: e2e-browser
jobs: ${{ toJSON(needs) }}