checks.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. changelog:
  14. if: github.event_name == 'pull_request' && github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. - name: Check diff
  19. run: |
  20. git fetch origin ${{ github.base_ref }} --depth=1
  21. if git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md ; then
  22. echo 'Missing changelog entry'
  23. exit 1
  24. fi
  25. lint:
  26. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v3
  30. - name: Set up environment
  31. uses: ./.github/actions/setup
  32. - run: npm run lint
  33. tests:
  34. runs-on: ubuntu-latest
  35. env:
  36. FORCE_COLOR: 1
  37. GAS: true
  38. steps:
  39. - uses: actions/checkout@v3
  40. - name: Set up environment
  41. uses: ./.github/actions/setup
  42. - name: Run tests and generate gas report
  43. run: npm run test
  44. - name: Check linearisation of the inheritance graph
  45. run: npm run test:inheritance
  46. - name: Check proceduraly generated contracts are up-to-date
  47. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  48. run: npm run test:generation
  49. - name: Compare gas costs
  50. uses: ./.github/actions/gas-compare
  51. with:
  52. token: ${{ github.token }}
  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