Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: skip test files in coverage, use SafeL2 contract for coverage calculation #674

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ ETHERSCAN_API_KEY=""
ERC4337_TEST_BUNDLER_URL=
ERC4337_TEST_NODE_URL=
ERC4337_TEST_SINGLETON_ADDRESS=
ERC4337_TEST_SAFE_FACTORY_ADDRESS=
ERC4337_TEST_SAFE_FACTORY_ADDRESS=
# (Optional) Tells the test runner which Safe Singleton Contract to use for testing: Safe or SafeL2. Defaults to Safe.
SAFE_CONTRACT_UNDER_TEST="Safe"
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.17.1
cache: 'npm'
- run: npm ci
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run coverage
- run: SAFE_CONTRACT_UNDER_TEST=SafeL2 npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.17.1
cache: 'npm'
cache: "npm"
- run: npm ci
- run: npm run lint:sol && npm run lint:ts && npm run lint:sol:prettier
tests-other:
Expand All @@ -40,8 +40,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.17.1
cache: 'npm'
- run: npm ci
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run coverage
- name: Coveralls
Expand All @@ -65,5 +65,5 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.17.1
cache: 'npm'
cache: "npm"
- run: (npm ci && npm run build && npx hardhat codesize --contractname Safe && npm run benchmark) || echo "Benchmark failed"
10 changes: 9 additions & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
module.exports = {
skipFiles: ["test/Token.sol", "test/ERC20Token.sol", "test/TestHandler.sol", "test/ERC1155Token.sol"],
skipFiles: [
"test/Token.sol",
"test/ERC20Token.sol",
"test/TestHandler.sol",
"test/ERC1155Token.sol",
"test/DelegateCaller.sol",
"test/Test4337ModuleAndHandler.sol",
"test/TestNativeTokenReceiver.sol",
],
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
invert: true, // Run the grep's inverse set.
Expand Down
Loading