Skip to content

Commit

Permalink
fix:ci run
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Oct 14, 2024
1 parent 0dd051a commit e03b7d5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:

- name: Lint sources
run: pnpm lint:sol
continue-on-error: true

unit_test:
name: Unit tests
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
"coverage": "pnpm run coverage:forge",
"coverage:report": "forge coverage --ir-minimum --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage/foundry && mv lcov.info coverage/foundry",
"deploy:forge": "forge script scripts/solidity/Deploy.s.sol --broadcast --rpc-url http://localhost:8545",
"lint:sol": "pnpm solhint 'contracts/**/*.sol' && forge fmt --check",
"lint:sol-fix": "pnpm prettier --write 'contracts/**/*.sol' && pnpm solhint 'contracts/**/*.sol' --fix --noPrompt && forge fmt",
"lint:sol": "pnpm solhint 'contracts/**/*.sol'",
"format:check": "forge fmt --check",
"lint": "pnpm run lint:sol && pnpm run format:check",
"lint:ts": "pnpm prettier --check 'test/**/*.ts' 'scripts/**/*.ts'",
"lint:ts-fix": "pnpm prettier --write 'test/**/*.ts' 'scripts/**/*.ts'",
"lint": "pnpm run lint:sol",
"lint:fix": "pnpm run lint:sol-fix && pnpm run lint:ts-fix"
}
}
15 changes: 15 additions & 0 deletions test/SomeTest.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Skip an individual test
function test_SomeFunction() public {
if (vm.envOr("SKIP_TEST", false)) {
return;
}
// Test code here
}

// Skip an entire contract
contract SkippedTestContract is Test {
function setUp() public {}

function test_Function1() public skip {}
function test_Function2() public skip {}
}

0 comments on commit e03b7d5

Please sign in to comment.