diff --git a/README.md b/README.md index c70f7db..360cc45 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ From inside the SolCover directory, run ```node ./runCoveredTests.js``` -Upon completion of the tests, open the `./coverage/index.html` file to browse the HTML coverage report. +Upon completion of the tests, open the `./coverage/lcov-report/index.html` file to browse the HTML coverage report. ###A few, uh, provisos, a, a couple of quid pro quos... It is very likely that there are valid Solidity statements that this tool won't instrument correctly, as it's only been developed against a small number of contracts. If (and when) you find such cases, please raise an issue. diff --git a/circle.yml b/circle.yml index 30c8325..7ea2dbc 100644 --- a/circle.yml +++ b/circle.yml @@ -5,4 +5,8 @@ dependencies: pre: - npm install -g truffle - rm -rf node_modules/ - \ No newline at end of file +test: + override: + - npm run test-cov + post: + - bash <(curl -s https://codecov.io/bash) diff --git a/package.json b/package.json index 7d84721..4420c31 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "test": "test" }, "scripts": { - "test": "mocha --timeout 30000" + "test": "mocha --timeout 30000", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --timeout 30000" }, "author": "", "license": "ISC", @@ -24,6 +25,7 @@ "ethereumjs-account": "~2.0.4", "ethereumjs-tx": "1.1.2", "ethereumjs-util": "~4.5.0", + "istanbul": "^0.4.5", "merkle-patricia-tree": "~2.1.2", "mocha": "^3.1.0", "solc": "0.4.6" diff --git a/runCoveredTests.js b/runCoveredTests.js index 2f61078..ca2763d 100644 --- a/runCoveredTests.js +++ b/runCoveredTests.js @@ -53,7 +53,7 @@ coverage.generate(events, './../originalContracts/'); fs.writeFileSync('./coverage.json', JSON.stringify(coverage.coverage)); -shell.exec("./node_modules/istanbul/lib/cli.js report html") +shell.exec("./node_modules/istanbul/lib/cli.js report lcov") testrpcProcess.kill(); shell.rm('-rf', './../contracts'); shell.mv('./../originalContracts', './../contracts');