Skip to content

Commit

Permalink
Skip test files in coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mmv08 committed Oct 9, 2023
1 parent 23f36d5 commit 0b4ee70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
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

0 comments on commit 0b4ee70

Please sign in to comment.