-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
implementation/package.json
Outdated
@@ -9,7 +9,9 @@ | |||
"js:lint": "eslint ${npm_package_config_eslintPaths}", | |||
"js:lint:fix": "eslint --fix ${npm_package_config_eslintPaths}", | |||
"sol:lint": "solium -d contracts/", | |||
"sol:lint:fix": "solium -d contracts/ --fix" | |||
"sol:lint:fix": "solium -d contracts/ --fix", | |||
"remix": "remixd -s . --remix-ide https://remix.ethereum.org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's that? Is remixd
installed as a dependency? Do we need this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh woops, will remove that.
@@ -52,6 +52,14 @@ module.exports = { | |||
gasPrice: 1 | |||
}, | |||
|
|||
coverage: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add docs why do we need this in the truffle config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing!
@@ -43,6 +43,12 @@ jobs: | |||
name: Run NPM tests | |||
working_directory: ~/project/implementation/contracts | |||
command: npm install && npm run setup && npm run test | |||
- run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract it from test_solidity
to a separate job? If we do we will also need to at it to a workflows
at the bottom of this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good idea!
Cool, coverage job is working. You can view an uploaded test report by navigating the artifacts tab. An example - https://3627-171933613-gh.circle-artifacts.com/0/home/circleci/project/implementation/coverage/index.html |
@liamzebedee can we either get this to not break the build and merge in master (ideal) or close? You can likely have this generating the coverage artifact without less-than-full coverage failing the test |
"less-than-full coverage" that's a good way of saying it's broken 😂 solidity-coverage appears to be broken for the interface contracts. Might be something to do with the upgrade to 0.5.0 (#213).
Closing this for now until there's a better idea 😢 |
@liamzebedee what specifically was breaking? you can force solidity-coverage to ignore specific files, e.g. interfaces |
|
Will re-open this, got a bit further just now with ignoring the files |
|
Yeah this is the current config I have:
But now getting this error sc-forks/solidity-coverage#245 - for tomorrow. |
We need to capture this in an issue rather than pull a PR into the sprint board. Incidentally that issue can explain reasoning, describe how we might make it accessible, how it would fit into any workflow, etc. Simply having test coverage available isn't really useful unless we know how it fits in with the workflow. |
I have it running on my local, but only when installing deps using yarn. Since solidity-coverage only has a Yarn lockfile, and not package-lock, it's likely there's a subdep that has changed. In either case, running it on CircleCI, and now there's a bizarre error about Node fibers. This is taking too long, gonna park it here for now |
Summary. Generates test coverage report for our Solidity contracts, using
solidity-coverage
. Closes #272. Some screenshots belowInstructions
npm i
npm run coverage
open coverage/index.html