Skip to content

Commit 635ca56

Browse files
ci(e2e): post-release smoke via install.sh (Phase 7 follow-up) (#102)
1 parent 3f0040f commit 635ca56

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"playground-cli": patch
3+
---
4+
5+
CI now validates the consumer install path after every stable release: `e2e-post-release.yml` fires on `release: published`, runs `install.sh`, and runs the same smoke tests as `e2e-release.yml` (Phase 7) but against the installed binary at `~/.polkadot/bin/dot`. Catches `install.sh` regressions that the prerelease/SEA-download path doesn't.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: E2E (Post-Release)
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: "Release tag to test (e.g. v0.16.0)"
10+
required: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
smoke:
17+
name: "E2E · post-release-smoke"
18+
if: github.event.release.prerelease != true || github.event_name == 'workflow_dispatch'
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: pnpm/action-setup@v4
27+
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: "22"
31+
32+
- run: pnpm install
33+
34+
- name: Resolve release tag
35+
id: tag
36+
shell: bash
37+
run: |
38+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
39+
TAG="${{ inputs.tag }}"
40+
else
41+
TAG="${{ github.event.release.tag_name }}"
42+
fi
43+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
44+
45+
- name: Wait for SEA asset on the release
46+
shell: /usr/bin/bash -euo pipefail {0}
47+
run: |
48+
TAG="${{ steps.tag.outputs.tag }}"
49+
for i in $(seq 1 30); do
50+
if gh release view "$TAG" --json assets --jq '.assets[].name' | grep -q "^dot-linux-x64$"; then
51+
echo "Found dot-linux-x64 asset on attempt $i"
52+
exit 0
53+
fi
54+
echo " attempt $i/30: waiting for asset..."
55+
sleep 10
56+
done
57+
echo "::error::Timed out waiting for dot-linux-x64 asset on $TAG"
58+
exit 1
59+
60+
- name: Install via install.sh (consumer path)
61+
shell: bash
62+
run: |
63+
TAG="${{ steps.tag.outputs.tag }}"
64+
# Pin to the just-released version; install.sh resolves "latest"
65+
# by default which can lag behind a just-published release.
66+
# install.sh runs `dot init` at the end; init requires an
67+
# interactive QR scan and will exit non-zero in headless CI —
68+
# that is expected. The binary is installed before init runs,
69+
# so we tolerate the init failure and verify the binary below.
70+
curl -fsSL "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/install.sh" \
71+
| VERSION="$TAG" bash || true
72+
# Hard-fail here if the binary was not installed — that IS a
73+
# real regression in the install script's download/chmod path.
74+
ls -la "$HOME/.polkadot/bin/dot"
75+
76+
- name: Compute installed-binary path
77+
shell: bash
78+
run: echo "DOT_E2E_BINARY=$HOME/.polkadot/bin/dot" >> "$GITHUB_ENV"
79+
80+
- name: Smoke test the installed binary
81+
uses: nick-fields/retry@v3
82+
with:
83+
timeout_minutes: 5
84+
max_attempts: 2
85+
retry_wait_seconds: 15
86+
command: pnpm exec vitest run --config e2e/vitest.config.ts e2e/cli/published.test.ts
87+
env:
88+
DOT_TAG: e2e-ci-post-release
89+
DOT_TELEMETRY: "1"
90+
91+
- name: Upload forensic artefacts
92+
if: always()
93+
continue-on-error: true
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: e2e-reports-post-release-smoke
97+
path: e2e-reports/
98+
retention-days: 7
99+
if-no-files-found: ignore

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ These are things that aren't self-evident from reading the code and have bitten
5858
- **CI workflow:** `.github/workflows/e2e.yml` — runs on PR / push:main / cron 06:00 UTC / workflow_dispatch.
5959
- **CI matrix:** 13 cells across four matrices — `test-no-publish` (parallel: pr-install, pr-preflight, pr-mod, pr-init-session) + `test-publish` (max-parallel: 1: pr-deploy-frontend, pr-deploy-foundry) + `test-nightly-no-publish` (parallel, schedule/dispatch only: nightly-mod-miss, nightly-diagnostic, nightly-rejections, nightly-chaos-sigint) + `test-nightly-publish` (max-parallel: 1, schedule/dispatch only: nightly-deploy-hardhat, nightly-deploy-multi, nightly-chaos-rpc). Each cell runs a subset via `vitest -t "<pattern>"`.
6060
- **Release smoke:** `.github/workflows/e2e-release.yml` fires on `release: prereleased`, downloads the `dot-linux-x64` SEA asset, and runs `e2e/cli/published.test.ts` against it. Validates the published binary before stable release.
61+
- **Post-release smoke:** `.github/workflows/e2e-post-release.yml` fires on `release: published` (stable only — `prerelease != true`), waits for the SEA asset, runs `install.sh` (consumer install path via `VERSION=<tag> curl … | bash`), then runs `published.test.ts` against the installed `~/.polkadot/bin/dot`. Catches `install.sh` regressions that the prerelease/SEA-download path doesn't.
6162
- **Test files:** `e2e/cli/*.test.ts` (vitest, spawned via `bun run src/index.ts`).
6263
- **Reports directory:** `e2e-reports/junit.xml` + `e2e-reports/dot-runs.log` (gitignored).
6364
- **Tag prefix:** `DOT_TAG=e2e-{ci|local}-{trigger}` so Sentry dashboards filter test traffic. The CLI plumbs `DOT_TAG` into the `cli.tag` root-span attribute via `src/telemetry-config.ts`.

0 commit comments

Comments
 (0)