Repository navigation
ci: run the required checks on every PR, name them, and shorten PR invariant runs - #328
Conversation
CI Summary
Contract Tests (Unit + Fuzz)BasicDotnsIntegrationReverts (test/intergration/BasicDotns.reverts.t.sol)
BasicDotnsIntegration (test/intergration/BasicDotns.t.sol)
DeployCreate3FactoryTest (test/unit/deploy/DeployCreate3Factory.t.sol)
DeterministicDeploymentTest (test/unit/deploy/DeterministicDeployment.t.sol)
DotnsContentResolverTests (test/unit/resolver/DotnsContentResolver.t.sol)
DotnsCostModelRegistryTests (test/unit/pop/DotnsCostModelRegistry.t.sol)
DotnsFlatPricingTests (test/unit/pop/DotnsFlatPricing.t.sol)
DotnsNameEscrowTest (test/unit/escrow/DotnsNameEscrow.t.sol)
DotnsNameEscrowFuzzTest (test/fuzz/escrow/DotnsNameEscrowFuzz.t.sol)
DotnsNameEscrowRedeemTest (test/unit/escrow/DotnsNameEscrowRedeem.t.sol)
DotnsNameEscrowRefundsTest (test/unit/escrow/DotnsNameEscrowRefunds.t.sol)
DotnsNameWhitelistTests (test/unit/whitelist/DotnsNameWhitelist.t.sol)
DotnsNameWhitelistFuzz (test/fuzz/whitelist/DotnsNameWhitelistFuzz.t.sol)
DotnsPopControllerTests (test/unit/registrar/DotnsPopController.t.sol)
DotnsPopControllerFuzz (test/fuzz/registrar/DotnsPopControllerFuzz.t.sol)
DotnsPopControllerLegacyTests (test/unit/registrar/DotnsPopControllerLegacy.t.sol)
DotnsPopResolverTests (test/unit/resolver/DotnsPopResolver.t.sol)
DotnsProtocolRegistryTldTests (test/unit/registry/DotnsProtocolRegistry.t.sol)
DotnsProtocolRegistryDeclarationTests (test/unit/registry/DotnsProtocolRegistryDeclarations.t.sol)
DotnsProtocolRegistryFuzzTest (test/fuzz/registry/DotnsProtocolRegistryFuzz.t.sol)
DotnsProtocolRegistryRemovalTests (test/unit/registry/DotnsProtocolRegistryRemoval.t.sol)
DotnsRegistrarTests (test/unit/registrar/DotnsRegistrar.t.sol)
DotnsRegistrarControllerTest (test/unit/registrar/DotnsRegistrarController.t.sol)
DotnsRegistrarControllerFuzzTest (test/fuzz/registrar/DotnsRegistrarControllerFuzz.t.sol)
DotnsRegistrarControllerLifecycleTest (test/unit/registrar/DotnsRegistrarControllerLifecycle.t.sol)
DotnsRegistryTests (test/unit/registry/DotnsRegistry.t.sol)
DotnsRegistryFuzzTest (test/fuzz/registry/DotnsRegistryFuzz.t.sol)
DotnsResolverTests (test/unit/resolver/DotnsResolver.t.sol)
DotnsReverseResolverTests (test/unit/resolver/DotnsReverseResolver.t.sol)
DotnsScarcityPricingTests (test/unit/pop/DotnsScarcityPricing.t.sol)
LabelEntryConflictTests (test/unit/store/LabelEntryConflict.t.sol)
LabelStoreTests (test/unit/store/LabelStore.t.sol)
LabelStoreFuzzTest (test/fuzz/store/LabelStoreFuzz.t.sol)
NameGrantFlow (test/intergration/NameGrantFlow.t.sol)
NoStatusDepositLifecycle (test/intergration/NoStatusDepositLifecycle.t.sol)
PopRulesFuzzTest (test/fuzz/pop/PopFuzz.t.sol)
PopLifecycleFlow (test/intergration/PopLifecycleFlow.t.sol)
PopRulesTests (test/unit/pop/PopRules.t.sol)
PopRulesClassificationTests (test/unit/pop/PopRulesClassification.t.sol)
StoreBeaconVerificationTests (test/unit/deploy/StoreBeaconVerification.t.sol)
StoreFactoryTests (test/unit/store/StoreFactory.t.sol)
StoreIntegrationTest (test/intergration/StoreIntegration.t.sol)
StoreStressTest (test/stress/store/StoreStress.t.sol)
StringUtilsTests (test/unit/utils/StringUtils.t.sol)
UserStoreTests (test/unit/store/UserStore.t.sol)
UserStoreFuzzTest (test/fuzz/store/UserStoreFuzz.t.sol)
Contract Tests (Invariant)CostModelVersionInvariantTest (test/invariant/pop/CostModelVersionInvariant.t.sol)
DotnsNameEscrowInvariantTest (test/invariant/escrow/DotnsNameEscrowInvariant.t.sol)
DotnsNameWhitelistInvariant (test/invariant/whitelist/DotnsNameWhitelistInvariant.t.sol)
DotnsPopControllerInvariant (test/invariant/registrar/DotnsPopControllerInvariant.t.sol)
DotnsRegistrarControllerInvariantTest (test/invariant/registrar/DotnsRegistrarControllerInvariant.t.sol)
DotnsRegistrarReservedGrantInvariantTest (test/invariant/registrar/DotnsRegistrarReservedGrantInvariant.t.sol)
DotnsRegistrarSoulboundInvariantTest (test/invariant/registrar/DotnsRegistrarSoulboundInvariant.t.sol)
DotnsRegistryInvariantTest (test/invariant/registry/DotnsRegistryInvariant.t.sol)
StoreInvariantTest (test/invariant/store/StoreInvariant.t.sol)
Deploy ContractsDeployed addresses vs the expected setExpected is the committed expected-address set; actual is this CI deployment of the same pipeline.
Labelsother |
|
Invariant tests now run in 29 minutes |
|
I think overall looks good. I had a few questions though:
N one important thing is, for the PRs made from a fork of this repo, the GitHub token used has a read-only access. So in that case, for the Format & Lint, Deploy Contracts and Secret Scan, when each of them try to post CI summary, it would fail, marking the checks themselves as failed. (PR Title and Labels would hit the same thing if we make them required) So in that case maybe we could have a In future we could also add timeouts for checks in general, this way we dont have jobs running until the max github limit, which ig is 6 hours |
Since 6f3afb1 File Validation is now on the required list, while PR Title and Labels stay optional since they don't catch code defects. Format & Lint, Deploy Contracts, Secret Scan and Report Test Results skip their summary comment on fork PRs, using the same guard as File Validation, so the checks report their own result. Every job has a timeout based on recent run times, including 3 hours on the release test step, which now uses the ci profile so a release gets the same 300-run campaign as master. I dropped the docs-only skip to keep the PR simple: done safely, it needs step-level gating in every heavy job or aggregator jobs, so every check keeps running in full. |
GHkrishna
left a comment
There was a problem hiding this comment.
Looks good to me.
One tiny thing, the timeouts cover the jobs in this PR, but other jobs still don't have one. Happy for that to be a follow-up
Description
Prepares the CI for required status checks on
master, which has none today.Every important check now runs on every pull request. A required check whose workflow does not start never reports, and GitHub then blocks the merge. These workflows lose their
pull_requestpaths:filter:Secret Scan and File Validation already ran on every pull request. The
pushfilters onmasterare unchanged, and Format & Lint keeps running on pull requests into any branch.Stable job names. Required checks match by name, and
check,deploy,validateandscanwould also match any later job with the same name. The jobs are now named Format & Lint, Deploy Contracts, Release Metadata, Live Manifests Unchanged and Secret Scan.Shorter invariant runs on pull requests. The invariant suite took about 96 minutes. Pull requests now run 100 runs per campaign (
FOUNDRY_INVARIANT_RUNS=100), and pushes tomasterkeep the ci profile's 300. No seed is fixed, so every run explores new sequences. The unit + fuzz leg is unaffected.Fork pull requests pass. Their token is read-only, so posting the summary comment would fail the check. Format & Lint, Deploy Contracts and Secret Scan skip the comment for them, with the guard File Validation already uses, and Report Test Results is skipped for forks.
Timeouts on every job, set from recent run times: Contract Tests (Invariant) 60 minutes on pull requests and 150 on
master, Contract Tests (Unit + Fuzz) and Deploy Contracts 30, Format & Lint 15, everything else 10.Releases test like
master. The publish workflows run their tests with theciprofile, so a release gets the same 300-run campaign on the commit it ships, with a 3-hour limit on that step.Type
Scope
Related Issues
Fixes
Checklist
Code
forge buildpassesforge testpassesTesting
Security
selfdestructordelegatecallDocumentation
Breaking Changes
Breaking changes:
How to test
This PR runs the new setup on itself (check CI).
Notes
Repo setting to update after merge: require these checks in the
masterruleset: Format & Lint, Contract Tests (Unit + Fuzz), Deploy Contracts, Release Metadata, Live Manifests Unchanged, Secret Scan, File Validation. PR Title, Labels, Contract Tests (Invariant), Coverage and the analysis reports stay optional.