Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: check api token for coverage and gas report #613

Merged
merged 4 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,21 @@ jobs:
environment:
CI: true
MOCHA_REPORTER: eth-gas-reporter
- run:
name: Show gas report
command: |
# Somehow the file output format is best read in shell
cat ~/repo/plasma_framework/gasReport.rst
- run:
name: Codechecks for gas usage
command: npx codechecks
command: |
# Don't submit gas report for forks or private mirror
[[ -z "${CC_SECRET}" ]] || npx codechecks
working_directory: ~/repo/plasma_framework
- store_artifacts:
path: ~/repo/plasma_framework/gasReporterOutput.json
- store_artifacts:
path: ~/repo/plasma_framework/gasReport.rst

Solidity coverage:
executor: truffle_executor
Expand All @@ -89,8 +100,18 @@ jobs:
- setup_truffle_env
- run:
name: Run solidity coverage
command: npm run coverage && cat coverage/lcov.info | coveralls
command: |
# Don't submit coverage report for forks, but let the build succeed
if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then
npm run coverage
else
npm run coverage && cat coverage/lcov.info | coveralls
fi
working_directory: ~/repo/plasma_framework
- store_artifacts:
path: ~/repo/plasma_framework/coverage
- store_artifacts:
path: ~/repo/plasma_framework/coverage.json

Javascript linter:
executor: truffle_executor
Expand Down
3 changes: 3 additions & 0 deletions plasma_framework/truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ module.exports = {
reporterOptions: {
currency: 'USD',
showTimeSpent: true,
rst: true,
rstTitle: 'Gas Report',
outputFile: './gasReport.rst',
src: 'contracts/src/',
},
},
Expand Down