checks.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. jobs:
  14. lint:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. - name: Set up environment
  19. uses: ./.github/actions/setup
  20. - run: npm run lint
  21. tests:
  22. runs-on: ubuntu-latest
  23. env:
  24. FORCE_COLOR: 1
  25. NODE_OPTIONS: --max_old_space_size=4096
  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. env:
  56. NODE_OPTIONS: --max_old_space_size=4096
  57. - name: Check linearisation of the inheritance graph
  58. run: npm run test:inheritance
  59. - name: Check storage layout
  60. uses: ./.github/actions/storage-layout
  61. with:
  62. token: ${{ github.token }}
  63. tests-foundry:
  64. runs-on: ubuntu-latest
  65. steps:
  66. - uses: actions/checkout@v3
  67. with:
  68. submodules: recursive
  69. - name: Install Foundry
  70. uses: foundry-rs/foundry-toolchain@v1
  71. with:
  72. version: nightly
  73. - name: Run tests
  74. run: forge test -vv
  75. coverage:
  76. runs-on: ubuntu-latest
  77. steps:
  78. - uses: actions/checkout@v3
  79. - name: Set up environment
  80. uses: ./.github/actions/setup
  81. - run: npm run coverage
  82. env:
  83. NODE_OPTIONS: --max_old_space_size=4096
  84. - uses: codecov/codecov-action@v3
  85. with:
  86. token: ${{ secrets.CODECOV_TOKEN }}
  87. slither:
  88. runs-on: ubuntu-latest
  89. steps:
  90. - uses: actions/checkout@v3
  91. - name: Set up environment
  92. uses: ./.github/actions/setup
  93. - run: rm foundry.toml
  94. - uses: crytic/slither-action@v0.3.0
  95. with:
  96. node-version: 18.15
  97. codespell:
  98. runs-on: ubuntu-latest
  99. steps:
  100. - uses: actions/checkout@v3
  101. - name: Run CodeSpell
  102. uses: codespell-project/actions-codespell@v2.0
  103. with:
  104. check_hidden: true
  105. check_filenames: true
  106. skip: package-lock.json,*.pdf