|
| 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 |
0 commit comments