checks.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  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. 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. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  36. run: npm run test:generation
  37. - name: Compare gas costs
  38. uses: ./.github/actions/gas-compare
  39. with:
  40. token: ${{ github.token }}
  41. foundry-tests:
  42. runs-on: ubuntu-latest
  43. steps:
  44. - uses: actions/checkout@v3
  45. with:
  46. submodules: recursive
  47. - name: Install Foundry
  48. uses: foundry-rs/foundry-toolchain@v1
  49. with:
  50. version: nightly
  51. - name: Run tests
  52. run: forge test -vv
  53. coverage:
  54. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  55. runs-on: ubuntu-latest
  56. steps:
  57. - uses: actions/checkout@v3
  58. - name: Set up environment
  59. uses: ./.github/actions/setup
  60. - run: npm run coverage
  61. env:
  62. NODE_OPTIONS: --max_old_space_size=4096
  63. - uses: codecov/codecov-action@v3
  64. slither:
  65. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  66. runs-on: ubuntu-latest
  67. steps:
  68. - uses: actions/checkout@v3
  69. - name: Set up environment
  70. uses: ./.github/actions/setup
  71. - uses: crytic/slither-action@v0.1.1
  72. codespell:
  73. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  74. runs-on: ubuntu-latest
  75. steps:
  76. - uses: actions/checkout@v3
  77. - name: Run CodeSpell
  78. uses: codespell-project/actions-codespell@v1.0
  79. with:
  80. check_filenames: true
  81. skip: package-lock.json