This is a basic skeleton to start a new hardhat/solidity project, with:
- some scripts configured in
package.json
lint
: runsolhint
using rules configured in.solhint.json
test
: run all smart contract teststest-json
: run all smart contracts tests and export results in JSON format (used in Github actions)coverage
: instrument and run all smart contracts tests to export code coveragenode
: run a local node to be able to deploy your smart contracts locallylocal
: deploy your smart contracts locally, using thescripts/deploy-local.js
script
- CI with Github actions
- run after each commit/PR on the
master
branch - run unit tests and generate a report directly in your Github repository, using the dorny/test-reporter action.
- run and generate a code coverage report in codecov using the codecov/codecov-action action.
- run static analysis with slither and export a report directly in the
Security
tab of your Github repository. This is done with the crytic/slither-action action which generates a standard SARIF file and then with the github/codeql-action/upload-sarif action to load this SARIF file your Github repository. - run linting
- run after each commit/PR on the
This skeleton will evolved regularly, each time I'll find a new interesting thing to add ;-)