Skip to content

Commit da4a5c5

Browse files
committed
ci(release): pivot to prerelease e2e flow
1 parent 903e69e commit da4a5c5

4 files changed

Lines changed: 23 additions & 233 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,3 @@ jobs:
3030

3131
- name: Run tests
3232
run: cargo test
33-
34-
- name: Run tier 1 smoke test
35-
env:
36-
PUNCH_BIN: target/debug/punch
37-
run: ./scripts/smoke-tier1.sh
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Tier 2 Smoke
1+
name: Release E2E
22

33
on:
44
release:
55
types:
6+
- prereleased
67
- published
78

89
permissions:
@@ -13,6 +14,9 @@ jobs:
1314
if: github.event.release.prerelease == true
1415
runs-on: ubuntu-latest
1516

17+
permissions:
18+
contents: write
19+
1620
steps:
1721
- name: Check out repository
1822
uses: actions/checkout@v6
@@ -29,7 +33,17 @@ jobs:
2933
--dir dist
3034
chmod +x dist/punch-linux-amd64
3135
32-
- name: Run tier 2 smoke test
36+
- name: Run E2E smoke test
3337
env:
3438
PUNCH_BIN: dist/punch-linux-amd64
35-
run: ./scripts/smoke-tier2.sh
39+
run: ./scripts/smoke-e2e.sh
40+
41+
- name: Promote release to latest
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
GH_REPO: ${{ github.repository }}
45+
run: |
46+
set -euo pipefail
47+
gh release edit "${{ github.event.release.tag_name }}" \
48+
--prerelease=false \
49+
--latest
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33

44
if [[ "${1:-}" == "--help" ]]; then
55
cat <<'EOF'
6-
Usage: scripts/smoke-tier2.sh
6+
Usage: scripts/smoke-e2e.sh
77
88
Runs the full same-machine end-to-end smoke checks:
99
- TCP listener mapping
@@ -44,7 +44,7 @@ TCP_IN_PID=""
4444
UDP_IN_PID=""
4545

4646
announce() {
47-
echo "tier2: $*" >&2
47+
echo "e2e: $*" >&2
4848
}
4949

5050
dump_logs() {
@@ -106,8 +106,7 @@ wait_for_public_key() {
106106

107107
wait_for_tcp_listener() {
108108
local pid="$1"
109-
local log_path="$2"
110-
local port="$3"
109+
local port="$2"
111110

112111
for _ in $(seq 1 100); do
113112
announce "wait for tcp listener"
@@ -172,7 +171,6 @@ PY
172171

173172
wait_for_udp_mapping() {
174173
local pid="$1"
175-
local log_path="$2"
176174

177175
for _ in $(seq 1 5); do
178176
announce "wait for udp mapping"
@@ -210,7 +208,7 @@ launch_tcp_until_ready() {
210208
announce "tcp launch attempt ${attempt}"
211209
: >"$log_path"
212210
start_tcp_mapping "$pubkey" "$log_path"
213-
if wait_for_tcp_listener "$TCP_IN_PID" "$log_path" "$TCP_LOCAL_PORT"; then
211+
if wait_for_tcp_listener "$TCP_IN_PID" "$TCP_LOCAL_PORT"; then
214212
return 0
215213
fi
216214
stop_process TCP_IN_PID
@@ -228,7 +226,7 @@ launch_udp_until_ready() {
228226
announce "udp launch attempt ${attempt}"
229227
: >"$log_path"
230228
start_udp_mapping "$pubkey" "$log_path"
231-
if UDP_RESULT="$(wait_for_udp_mapping "$UDP_IN_PID" "$log_path")"; then
229+
if UDP_RESULT="$(wait_for_udp_mapping "$UDP_IN_PID")"; then
232230
printf '%s\n' "$UDP_RESULT"
233231
return 0
234232
fi
@@ -375,4 +373,4 @@ if [[ "$STDIO_RESULT" != "stdio-e2e" ]]; then
375373
fi
376374

377375
announce "stdio phase passed"
378-
echo "tier2: success"
376+
echo "e2e: success"

scripts/smoke-tier1.sh

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)