Repository navigation
101 lines (81 loc) · 4.28 KB
/
Copy pathvalidate-common-scripts.yml
File metadata and controls
101 lines (81 loc) · 4.28 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
name: Validate EVM Scripts
on:
pull_request:
push:
branches: [main]
# Least-privilege default: this workflow only reads the repo to build/lint.
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
# base/contracts releases/v8.3.0 — the version the active/evm shared Foundry project
# (active/evm/foundry.toml) and script/common/ are written against. Bump this
# together with the task .env pins when moving to a newer base-contracts.
BASE_CONTRACTS_COMMIT: 385f21a41f277d287db92fffe88dca41299162ea
jobs:
validate-common:
name: active and standby EVM scripts
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Test pause signing
run: python3 -B -m unittest discover -s active/evm/script/common/pause/tests -v
# ── Toolchain (mise) ─────────────────────────────────────────────
# Installs all tools pinned in mise.toml (foundry, node, bun, go) so
# CI runs match local signer environments byte-for-byte.
- name: Install mise-managed toolchain
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
experimental: true
# eip712sign (installed by make deps) builds base/usbwallet's hidapi hidraw
# backend on Linux, which needs the libudev headers.
- name: Install libudev headers
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libudev-dev
# ── Dependencies ─────────────────────────────────────────────────
# Install Foundry deps into the shared active/evm project. PROJECT_DIR
# points forge install at active/evm; BASE_CONTRACTS_COMMIT is supplied
# via env since the shared project has no task .env of its own.
- name: Install dependencies
run: make deps PROJECT_DIR="$PWD/active/evm"
# ── Validation ───────────────────────────────────────────────────
- name: Check Solidity formatting
working-directory: active/evm
run: |
echo "==> forge fmt --check script/"
if ! forge fmt --check script/; then
echo ""
echo "::error::Formatting check failed. Run 'forge fmt script/' in active/evm to fix."
exit 1
fi
- name: Build (forge build)
working-directory: active/evm
run: |
echo "==> forge build"
if ! forge build; then
echo ""
echo "::error::Compilation failed. Check imports, types, and dependency versions."
exit 1
fi
- name: Check standby Solidity formatting
run: forge fmt --root . --check standby/evm/tasks/ scripts/tests/*.sol
- name: Compile standby Solidity using the shared contracts pin
working-directory: active/evm
run: find ../../standby/evm/tasks -path '*/script/*.sol' -not -path '*/update-verifier-hashes/*' -exec forge build {} +
- name: Install local ProtocolVersions fixture dependency
working-directory: active/evm
run: forge install --no-git github.com/OpenZeppelin/openzeppelin-contracts@ecd2ca2cd7cac116f7a37d0e474bbb3d7d5e1c4d
- name: Test standby delay invariants
run: sh scripts/tests/run-standby-solidity.sh
- name: Build and test verifier standby against its supported contracts pin
run: STANDBY_OPERATION=update-verifier-hashes sh scripts/tests/run-standby-solidity.sh
- name: Test standby archival and Make guards without credentials
run: python3 -B -m unittest scripts.tests.test_standby_lifecycle -v
- name: Test pinned validation generator and signer discovery/API paths
run: sh scripts/tests/run-signer-standby.sh