Repository navigation
117 lines (103 loc) · 5.25 KB
/
Copy pathsmoke-tests.yml
File metadata and controls
117 lines (103 loc) · 5.25 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
107
108
109
110
111
112
113
114
115
116
117
name: Base Std Smoke Tests (Vibenet)
# Advisory, MANUALLY-triggered smoke run of the FULL b20 suite against a LIVE Base network
# (Vibenet by default).
#
# workflow_dispatch ONLY — deliberately not pull_request / merge_group / schedule. Vibenet is a
# live chain, manually deployed per hardfork; CI cannot guarantee which precompile set is live, so
# an automated run would flap. This job never gates merges: it is a bring-up check you run by hand
# (e.g. after a hardfork ships to Vibenet) to confirm the b20 surface behaves against the real Rust
# precompiles. It always runs the whole suite against the ref you dispatch from (latest = main) —
# there is no journey picker and no fork/ref selector (branch-per-fork: dispatch from the branch/tag
# that matches the fork you want). Each journey self-skips when the live chain is not yet on the fork
# that ships its surface (e.g. the ERC-8056 multiplier journey on a pre-Cobalt chain).
on:
workflow_dispatch:
inputs:
rpc_url:
description: "JSON-RPC endpoint of the live chain"
required: true
default: https://rpc.vibes.base.org/
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}
cancel-in-progress: false
permissions:
contents: read
jobs:
smoke:
name: Vibenet smoke
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout base-std
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e # v1.5.0
with:
version: stable
- name: Set up Python 3.13
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.13'
- name: Set up smoke runner venv
shell: bash
# setup-python makes python3 == 3.13; make python-check enforces it.
run: make smoke-setup PYTHON=python3
- name: Build contracts (interface ABIs the harness binds to)
shell: bash
run: forge build
- name: Run the full Vibenet smoke suite
id: smoke
shell: bash
# RPC_URL comes from the dispatch input; the two keys are repo secrets (never echoed). `-k`
# (keep-going) runs every journey and prints a summary, so one journey's failure/skip never
# masks the rest; it always exits 0, so the (advisory) job stays green and the summary below
# reports the real per-journey status. continue-on-error still guards against an infra crash.
continue-on-error: true
env:
RPC_URL: ${{ inputs.rpc_url }}
DEPLOYER_PK: ${{ secrets.SMOKE_DEPLOYER_PK }}
USER2_PK: ${{ secrets.SMOKE_USER2_PK }}
run: |
set -o pipefail
PYTHONPATH=script script/smoke/.venv/bin/python -m smoke all -k \
2>&1 | tee "$RUNNER_TEMP/smoke-output.txt"
- name: Summarize smoke results
if: always()
shell: bash
run: |
output="$RUNNER_TEMP/smoke-output.txt"
# Vibenet chain id, as logged by the harness preflight ("preflight ok — chain=<id> ...").
chain_id=$(grep -oE 'chain=[0-9]+' "$output" 2>/dev/null | head -1 | cut -d= -f2)
chain_id=${chain_id:-unknown}
# The -k runner prints "smoke summary: P passed, F failed, S skipped (of N)".
summary=$(grep -oE 'smoke summary: [0-9]+ passed, [0-9]+ failed, [0-9]+ skipped' "$output" 2>/dev/null | tail -1)
passed=$(echo "$summary" | grep -oE '[0-9]+ passed' | grep -oE '[0-9]+'); passed=${passed:-0}
failed=$(echo "$summary" | grep -oE '[0-9]+ failed' | grep -oE '[0-9]+'); failed=${failed:-0}
skipped=$(echo "$summary" | grep -oE '[0-9]+ skipped' | grep -oE '[0-9]+'); skipped=${skipped:-0}
{
echo "## Vibenet Smoke Results"
echo ""
echo "| Field | Value |"
echo "|---|---|"
echo "| Ref | \`${{ github.ref_name }}\` |"
echo "| RPC endpoint | \`${{ inputs.rpc_url }}\` |"
echo "| Chain id | \`${chain_id}\` |"
echo "| Passed / Failed / Skipped | ${passed} / ${failed} / ${skipped} |"
echo ""
if [ -z "$summary" ]; then
echo "❓ **Did not run** — no summary produced (likely an infra error before the suite ran, e.g. RPC unreachable). Check the run log."
elif [ "$failed" -ne 0 ]; then
echo "❌ **${failed} journey(s) failed** — an assertion or expected revert did not match. Advisory only; does not gate merges. See the run log for the failing journey and its trace."
elif [ "$passed" -ne 0 ]; then
echo "✅ **${passed} passed** (${skipped} skipped) — the b20 surface behaved against the live precompiles."
else
echo "⏭️ **All ${skipped} skipped** — Vibenet is not on the expected fork yet (feature inactive or pre-fork). Chain/fork state, not a defect."
fi
} >> "$GITHUB_STEP_SUMMARY"