test.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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@v3
  14. - uses: actions/setup-node@v3
  15. with:
  16. node-version: 12.x
  17. - uses: actions/cache@v3
  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. - run: npm run test:generation
  32. - name: Print gas report
  33. run: cat gas-report.txt
  34. coverage:
  35. runs-on: ubuntu-latest
  36. steps:
  37. - uses: actions/checkout@v3
  38. with:
  39. fetch-depth: 2
  40. - uses: actions/setup-node@v3
  41. with:
  42. node-version: 12.x
  43. - uses: actions/cache@v3
  44. id: cache
  45. with:
  46. path: '**/node_modules'
  47. key: npm-v2-${{ hashFiles('**/package-lock.json') }}
  48. restore-keys: npm-v2-
  49. - run: npm ci
  50. if: steps.cache.outputs.cache-hit != 'true'
  51. - run: npm run coverage
  52. env:
  53. NODE_OPTIONS: --max_old_space_size=4096
  54. - uses: codecov/codecov-action@v3