checks.yml 2.7 KB

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