Skip to content

Commit ca5becb

Browse files
committed
ci: add invariant tests to pipeline
1 parent 8aa5388 commit ca5becb

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/fuzz.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ jobs:
5151

5252
- name: Fuzz test smart contracts
5353
run: npm run test:fuzz
54+
55+
- name: Invariant test smart contracts
56+
run: npm run test:invariant

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,12 @@ safe-change-owner: validate-deploy change-owner-fork
10711071
docs:
10721072
@echo "Documentation is available in docs/FOUNDRY_MAKEFILE_GUIDE.md"
10731073

1074+
# Invariant tests
1075+
.PHONY: test-invariant
1076+
test-invariant:
1077+
@echo "Running invariant tests..."
1078+
forge test --match-path "test/invariant/**/*.t.sol" -vv
1079+
10741080
# Catch-all target for hash-quote arguments (pegin/pegout, network names, file paths)
10751081
# This prevents make from complaining about unknown targets when using: make hash-quote pegin testnet
10761082
ifneq (,$(findstring hash-quote,$(MAKECMDGOALS)))

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"compile": "npm run lint:sol && forge build",
88
"test": "npm run compile && make test-unit",
99
"test:fuzz": "npm run compile && make test-fuzz",
10+
"test:invariant": "npm run compile && make test-invariant",
1011
"coverage": "forge coverage",
1112
"lint:ts": "npx prettier --check . && npx eslint .",
1213
"lint:sol": "solhint 'src/**/*.sol'",

0 commit comments

Comments
 (0)