Skip to content

Add CI: build, test, fmt, coverage#30

Open
eric-ships wants to merge 1 commit into
mainfrom
eric/ci
Open

Add CI: build, test, fmt, coverage#30
eric-ships wants to merge 1 commit into
mainfrom
eric/ci

Conversation

@eric-ships
Copy link
Copy Markdown
Collaborator

Motivation

No CI exists on the repo. With audit kickoff on May 25, every PR should be automatically gated on compilation, tests, and formatting so reviewers and auditors can trust the green checkmark.

What changed

.github/workflows/ci.yml with four jobs that run on every push to main and every PR:

  • Buildforge build --sizes: catches interface drift and prints contract size report
  • Testforge test -v: runs the full fuzz suite (currently 76 PolicyRegistry tests + B20/factory suite)
  • Formatforge fmt --check: prevents unformatted code from landing
  • Coverageforge coverage --report lcov + Codecov upload: informational only (fail_ci_if_error: false), uploads LCOV to Codecov for PR annotations

Setup required

Codecov upload requires a CODECOV_TOKEN secret added in repo settings (Settings > Secrets > Actions). The coverage job does not fail CI if the token is missing or the upload fails.

Runs on every push to main and every PR:
- forge build --sizes (compilation + contract size report)
- forge test -v (full test suite with fuzz)
- forge fmt --check (formatting gate)
- forge coverage --report lcov + Codecov upload (informational, not a gate)

Codecov upload requires CODECOV_TOKEN secret to be set in repo settings.
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.

1 participant