-
Notifications
You must be signed in to change notification settings - Fork 11
106 lines (93 loc) · 4.23 KB
/
Copy pathe2e-post-release.yml
File metadata and controls
106 lines (93 loc) · 4.23 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
98
99
100
101
102
103
104
105
106
name: E2E (Post-Release)
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag to test (e.g. v0.16.0)"
required: true
permissions:
contents: read
jobs:
smoke:
name: "E2E · post-release-smoke"
if: github.event.release.prerelease != true || github.event_name == 'workflow_dispatch'
runs-on: ${{ github.repository_owner == 'paritytech' && 'parity-default' || 'ubuntu-latest' }}
timeout-minutes: 15
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: pnpm install
- name: Resolve release tag
id: tag
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ inputs.tag }}"
else
TAG="${{ github.event.release.tag_name }}"
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Ensure gh CLI
run: type gh >/dev/null 2>&1 || (sudo apt-get update -qq && sudo apt-get install -y gh)
- name: Wait for SEA asset on the release
shell: /usr/bin/bash -euo pipefail {0}
run: |
TAG="${{ steps.tag.outputs.tag }}"
for i in $(seq 1 30); do
if gh release view "$TAG" --json assets --jq '.assets[].name' | grep -q "^dot-linux-x64$"; then
echo "Found dot-linux-x64 asset on attempt $i"
exit 0
fi
echo " attempt $i/30: waiting for asset..."
sleep 10
done
echo "::error::Timed out waiting for dot-linux-x64 asset on $TAG"
exit 1
- name: Install via install.sh (consumer path)
shell: bash
run: |
TAG="${{ steps.tag.outputs.tag }}"
# Pin to the just-released version; install.sh resolves "latest"
# by default which can lag behind a just-published release.
# install.sh runs `playground login` at the end; login requires
# an interactive QR scan and will exit non-zero in headless CI —
# that is expected. The binary is installed before login runs,
# so we tolerate the login failure and verify the binary below.
curl -fsSL "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/install.sh" \
| VERSION="$TAG" bash || true
# Hard-fail here if the binary was not installed — that IS a
# real regression in the install script's download/chmod path.
ls -la "$HOME/.polkadot/bin/playground"
- name: Compute installed-binary path
shell: bash
run: echo "DOT_E2E_BINARY=$HOME/.polkadot/bin/playground" >> "$GITHUB_ENV"
- name: Smoke test the installed binary
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 2
retry_wait_seconds: 15
command: pnpm exec vitest run --config e2e/vitest.config.ts e2e/cli/published.test.ts
env:
DOT_TAG: e2e-ci-post-release
DOT_TELEMETRY: "1"
# Dedicated-funder seed — the primary account globalSetup
# tops up SIGNER from, ahead of the Alice fallback. Absent →
# Alice only.
MASTER_FUNDER_SEED: ${{ secrets.MASTER_FUNDER_SEED }}
- name: Upload forensic artefacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: e2e-reports-post-release-smoke
path: e2e-reports/
retention-days: 7
if-no-files-found: ignore