checks.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. jobs:
  13. lint:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@v3
  17. - name: Set up environment
  18. uses: ./.github/actions/setup
  19. - run: npm run lint
  20. tests:
  21. runs-on: ubuntu-latest
  22. env:
  23. FORCE_COLOR: 1
  24. NODE_OPTIONS: --max_old_space_size=4096
  25. GAS: true
  26. steps:
  27. - uses: actions/checkout@v3
  28. - name: Set up environment
  29. uses: ./.github/actions/setup
  30. - name: Run tests and generate gas report
  31. run: npm run test
  32. - name: Check linearisation of the inheritance graph
  33. run: npm run test:inheritance
  34. - name: Check proceduraly generated contracts are up-to-date
  35. run: npm run test:generation
  36. - name: Compare gas costs
  37. uses: ./.github/actions/gas-compare
  38. with:
  39. token: ${{ github.token }}
  40. tests-upgradeable:
  41. runs-on: ubuntu-latest
  42. env:
  43. FORCE_COLOR: 1
  44. steps:
  45. - uses: actions/checkout@v3
  46. with:
  47. fetch-depth: 0 # Include history so patch conflicts are resolved automatically
  48. - name: Set up environment
  49. uses: ./.github/actions/setup
  50. - name: Transpile to upgradeable
  51. run: bash scripts/upgradeable/transpile.sh
  52. - name: Run tests
  53. run: npm run test
  54. env:
  55. NODE_OPTIONS: --max_old_space_size=4096
  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. env:
  82. NODE_OPTIONS: --max_old_space_size=4096
  83. - uses: codecov/codecov-action@v3
  84. with:
  85. token: ${{ secrets.CODECOV_TOKEN }}
  86. slither:
  87. runs-on: ubuntu-latest
  88. steps:
  89. - uses: actions/checkout@v3
  90. - name: Set up environment
  91. uses: ./.github/actions/setup
  92. - run: rm foundry.toml
  93. - uses: crytic/slither-action@v0.3.0
  94. with:
  95. node-version: 18.15
  96. codespell:
  97. runs-on: ubuntu-latest
  98. steps:
  99. - uses: actions/checkout@v3
  100. - name: Run CodeSpell
  101. uses: codespell-project/actions-codespell@v2.0
  102. with:
  103. check_hidden: true
  104. check_filenames: true
  105. skip: package-lock.json,*.pdf