coverage.js 501 B

123456789101112131415161718192021
  1. #!/usr/bin/env node
  2. const { execSync } = require('child_process');
  3. const { runCoverage } = require('@openzeppelin/test-environment');
  4. async function main () {
  5. await runCoverage(
  6. ['mocks'],
  7. 'npm run compile',
  8. './node_modules/.bin/mocha --exit --timeout 10000 --recursive'.split(' '),
  9. );
  10. if (process.env.CI) {
  11. execSync('curl -s https://codecov.io/bash | bash -s -- -C "$CIRCLE_SHA1"', { stdio: 'inherit' });
  12. }
  13. }
  14. main().catch(e => {
  15. console.error(e);
  16. process.exit(1);
  17. });