Skip to content

ci: validate common scripts - #774

Closed
leopoldjoy wants to merge 1 commit into
mainfrom
chore/validate-common-script
Closed

leopoldjoy wants to merge 1 commit into
mainfrom
chore/validate-common-script

Conversation

@leopoldjoy

Copy link
Copy Markdown
Contributor

Summary

  • replace the template validation workflow with validation for shared active/evm/script/common scripts
  • pin the Base contracts dependency used by the shared Foundry project
  • check Solidity formatting and compilation in CI

Testing

  • mise exec -- go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/validate-common-script.yml
  • git diff --check
  • Forge formatting/build not run locally because active/evm is not present on current main

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 2
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 2
2
1 if commit is unverified 0
Sum 2

Comment on lines +20 to +66
name: active/evm script/common
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

# ── 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

# ── 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
@leopoldjoy leopoldjoy closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants