test.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Test
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - release-v*
  7. pull_request: {}
  8. workflow_dispatch: {}
  9. jobs:
  10. test:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v2
  14. - uses: actions/setup-node@v2
  15. with:
  16. node-version: 12.x
  17. - uses: actions/cache@v2
  18. id: cache
  19. with:
  20. path: '**/node_modules'
  21. key: npm-v2-${{ hashFiles('**/package-lock.json') }}
  22. restore-keys: npm-v2-
  23. - run: npm ci
  24. if: steps.cache.outputs.cache-hit != 'true'
  25. - run: npm run lint
  26. - run: npm run test
  27. env:
  28. FORCE_COLOR: 1
  29. ENABLE_GAS_REPORT: true
  30. - run: npm run test:inheritance
  31. - name: Print gas report
  32. run: cat gas-report.txt
  33. coverage:
  34. runs-on: ubuntu-latest
  35. steps:
  36. - uses: actions/checkout@v2
  37. with:
  38. fetch-depth: 2
  39. - uses: actions/setup-node@v2
  40. with:
  41. node-version: 12.x
  42. - uses: actions/cache@v2
  43. id: cache
  44. with:
  45. path: '**/node_modules'
  46. key: npm-v2-${{ hashFiles('**/package-lock.json') }}
  47. restore-keys: npm-v2-
  48. - run: npm ci
  49. if: steps.cache.outputs.cache-hit != 'true'
  50. - run: npm run coverage
  51. env:
  52. NODE_OPTIONS: --max_old_space_size=4096
  53. - uses: codecov/codecov-action@v2