forked from redhat-developer/rhdh
-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (82 loc) · 3.29 KB
/
Copy pathe2e-cluster-free.yaml
File metadata and controls
97 lines (82 loc) · 3.29 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: E2E Cluster-free Harness
# Runs the cluster-free local E2E harness (RHIDP-13501 / RHIDP-15075): boots the
# backend and the legacy app dev server in-process and drives Playwright against
# them, with dynamic plugins pulled from the public catalog index via the
# install-dynamic-plugins CLI (skopeo). No OpenShift/Kubernetes cluster or image.
# See docs/e2e-tests/local-e2e-harness.md.
on:
pull_request:
paths:
- "e2e-tests/**"
- "app-config*.yaml"
- ".github/workflows/e2e-cluster-free.yaml"
push:
branches:
- "main"
- "release-*"
paths:
- "e2e-tests/**"
- "app-config*.yaml"
- ".github/workflows/e2e-cluster-free.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
# Public index; release branches can override to the matching :1.y tag.
CATALOG_INDEX_IMAGE: quay.io/rhdh/plugin-catalog-index:latest
jobs:
legacy-local:
name: Cluster-free E2E (legacy app)
runs-on: ubuntu-latest
# Playwright image: browsers + OS deps preinstalled (matches @playwright/test
# 1.59.1), so no browser-install step (which hung on plain ubuntu runners).
container:
image: mcr.microsoft.com/playwright:v1.59.1-noble
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: ".nvmrc"
- name: Enable Corepack (vendored yarn 4)
run: corepack enable
- name: Cache yarn global cache
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
with:
path: ~/.yarn/berry/cache
key: yarn-${{ hashFiles('yarn.lock', 'e2e-tests/yarn.lock') }}
restore-keys: |
yarn-
- name: Install skopeo
run: |
apt-get update
apt-get install -y --no-install-recommends skopeo
- name: Install dependencies (root)
run: yarn install
- name: Install dependencies (e2e-tests)
working-directory: ./e2e-tests
run: yarn install --mode=skip-build
- name: Populate dynamic-plugins-root from the catalog index
# Mirrors the install-dynamic-plugins flow used by the nightly sanity check:
# an empty plugin list + CATALOG_INDEX_IMAGE pulls the default plugin set
# (incl. the dynamic home-page plugin) from the public index via skopeo.
run: |
mkdir -p dynamic-plugins-root
printf 'plugins: []\n' > dynamic-plugins.yaml
cp dynamic-plugins.yaml dynamic-plugins-root/dynamic-plugins.yaml
npx -y @red-hat-developer-hub/cli-module-install-dynamic-plugins@0.2.0 install dynamic-plugins-root
- name: Run cluster-free E2E (legacy app)
working-directory: ./e2e-tests
run: yarn e2e:legacy-local
- name: Upload Playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: playwright-report-legacy-local
path: e2e-tests/playwright-report-legacy-local
retention-days: 7