Skip to content

Commit ab72af0

Browse files
gustavoliraclaude
andcommitted
ci(e2e): run cluster-free harness on GitHub Actions
Add .github/workflows/e2e-cluster-free.yaml: a no-cluster job that installs deps + skopeo, populates dynamic-plugins-root from the public catalog index via the install-dynamic-plugins CLI (same mechanism as the nightly sanity check), boots the backend + legacy app dev servers in-process, and runs yarn e2e:legacy-local. Triggers on e2e-tests/** and app-config*.yaml. Follows the project workflow-security rules: pull_request (no secrets, public image), pinned action SHAs, minimal permissions, concurrency control. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1bf02b5 commit ab72af0

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: E2E Cluster-free Harness
2+
3+
# Runs the cluster-free local E2E harness (RHIDP-13501 / RHIDP-15075): boots the
4+
# backend and the legacy app dev server in-process and drives Playwright against
5+
# them, with dynamic plugins pulled from the public catalog index via the
6+
# install-dynamic-plugins CLI (skopeo). No OpenShift/Kubernetes cluster or image.
7+
# See docs/e2e-tests/local-e2e-harness.md.
8+
9+
on:
10+
pull_request:
11+
paths:
12+
- "e2e-tests/**"
13+
- "app-config*.yaml"
14+
- ".github/workflows/e2e-cluster-free.yaml"
15+
push:
16+
branches:
17+
- "main"
18+
- "release-*"
19+
paths:
20+
- "e2e-tests/**"
21+
- "app-config*.yaml"
22+
- ".github/workflows/e2e-cluster-free.yaml"
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
30+
31+
env:
32+
# Public index; release branches can override to the matching :1.y tag.
33+
CATALOG_INDEX_IMAGE: quay.io/rhdh/plugin-catalog-index:latest
34+
35+
jobs:
36+
legacy-local:
37+
name: Cluster-free E2E (legacy app)
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
42+
with:
43+
persist-credentials: false
44+
45+
- name: Set up Node.js
46+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
47+
with:
48+
node-version-file: ".nvmrc"
49+
50+
- name: Install skopeo
51+
run: |
52+
sudo apt-get update
53+
sudo apt-get install -y --no-install-recommends skopeo
54+
55+
- name: Install dependencies (root)
56+
run: yarn install
57+
58+
- name: Install dependencies (e2e-tests)
59+
working-directory: ./e2e-tests
60+
run: yarn install --mode=skip-build
61+
62+
- name: Install Playwright browser
63+
working-directory: ./e2e-tests
64+
run: yarn playwright install --with-deps chromium
65+
66+
- name: Populate dynamic-plugins-root from the catalog index
67+
# Mirrors the install-dynamic-plugins flow used by the nightly sanity check:
68+
# an empty plugin list + CATALOG_INDEX_IMAGE pulls the default plugin set
69+
# (incl. the dynamic home-page plugin) from the public index via skopeo.
70+
run: |
71+
mkdir -p dynamic-plugins-root
72+
printf 'plugins: []\n' > dynamic-plugins.yaml
73+
cp dynamic-plugins.yaml dynamic-plugins-root/dynamic-plugins.yaml
74+
npx -y @red-hat-developer-hub/cli-module-install-dynamic-plugins@0.2.0 install dynamic-plugins-root
75+
76+
- name: Run cluster-free E2E (legacy app)
77+
working-directory: ./e2e-tests
78+
run: yarn e2e:legacy-local
79+
80+
- name: Upload Playwright report
81+
if: ${{ !cancelled() }}
82+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
83+
with:
84+
name: playwright-report-legacy-local
85+
path: e2e-tests/playwright-report-legacy-local
86+
retention-days: 7

docs/e2e-tests/local-e2e-harness.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ With plugins populated, the legacy app renders the full production RHDH UI off-c
6060
`guest-signin-happy-path` **home-page test passes unmodified** — confirming a dynamic
6161
frontend plugin renders with no cluster.
6262

63+
## CI
64+
65+
`.github/workflows/e2e-cluster-free.yaml` runs this harness on GitHub Actions in a
66+
cluster-free phase: it installs deps + skopeo, populates `dynamic-plugins-root` from the
67+
public catalog index via the `install-dynamic-plugins` CLI (the same mechanism the
68+
nightly sanity check uses), then runs `yarn e2e:legacy-local`. No cluster or container
69+
image is built. It triggers on `e2e-tests/**` and `app-config*.yaml` changes; the scope
70+
can widen to `packages/app/**` / `packages/backend/**` once it is proven stable.
71+
6372
## Why the legacy app, not app-next
6473

6574
The harness targets the legacy app because **dynamic frontend plugins do not load on

0 commit comments

Comments
 (0)