checks.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. name: checks
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - next-v*
  7. - release-v*
  8. pull_request: {}
  9. workflow_dispatch: {}
  10. concurrency:
  11. group: checks-${{ github.ref }}
  12. cancel-in-progress: true
  13. env:
  14. NODE_OPTIONS: --max_old_space_size=5120
  15. jobs:
  16. lint:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v3
  20. - name: Set up environment
  21. uses: ./.github/actions/setup
  22. - run: npm run lint
  23. tests:
  24. runs-on: ubuntu-latest
  25. env:
  26. FORCE_COLOR: 1
  27. GAS: true
  28. steps:
  29. - uses: actions/checkout@v3
  30. - name: Set up environment
  31. uses: ./.github/actions/setup
  32. - name: Run tests and generate gas report
  33. run: npm run test
  34. - name: Check linearisation of the inheritance graph
  35. run: npm run test:inheritance
  36. - name: Check proceduraly generated contracts are up-to-date
  37. run: npm run test:generation
  38. - name: Compare gas costs
  39. uses: ./.github/actions/gas-compare
  40. with:
  41. token: ${{ github.token }}
  42. tests-upgradeable:
  43. runs-on: ubuntu-latest
  44. env:
  45. FORCE_COLOR: 1
  46. steps:
  47. - uses: actions/checkout@v3
  48. with:
  49. fetch-depth: 0 # Include history so patch conflicts are resolved automatically
  50. - name: Set up environment
  51. uses: ./.github/actions/setup
  52. - name: Transpile to upgradeable
  53. run: bash scripts/upgradeable/transpile.sh
  54. - name: Run tests
  55. run: npm run test
  56. - name: Check linearisation of the inheritance graph
  57. run: npm run test:inheritance
  58. - name: Check storage layout
  59. uses: ./.github/actions/storage-layout
  60. with:
  61. token: ${{ github.token }}
  62. tests-foundry:
  63. runs-on: ubuntu-latest
  64. steps:
  65. - uses: actions/checkout@v3
  66. with:
  67. submodules: recursive
  68. - name: Install Foundry
  69. uses: foundry-rs/foundry-toolchain@v1
  70. with:
  71. version: nightly
  72. - name: Run tests
  73. run: forge test -vv
  74. coverage:
  75. runs-on: ubuntu-latest
  76. steps:
  77. - uses: actions/checkout@v3
  78. - name: Set up environment
  79. uses: ./.github/actions/setup
  80. - run: npm run coverage
  81. - uses: codecov/codecov-action@v3
  82. with:
  83. token: ${{ secrets.CODECOV_TOKEN }}
  84. slither:
  85. runs-on: ubuntu-latest
  86. steps:
  87. - uses: actions/checkout@v3
  88. - name: Set up environment
  89. uses: ./.github/actions/setup
  90. - run: rm foundry.toml
  91. - uses: crytic/slither-action@v0.3.0
  92. with:
  93. node-version: 18.15
  94. codespell:
  95. runs-on: ubuntu-latest
  96. steps:
  97. - uses: actions/checkout@v3
  98. - name: Run CodeSpell
  99. uses: codespell-project/actions-codespell@v2.0
  100. with:
  101. check_hidden: true
  102. check_filenames: true
  103. skip: package-lock.json,*.pdf