checks.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. changelog:
  15. if: github.event_name == 'pull_request' && github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v3
  19. - name: Check diff
  20. run: |
  21. git fetch origin ${{ github.base_ref }} --depth=1
  22. if git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md ; then
  23. echo 'Missing changelog entry'
  24. exit 1
  25. fi
  26. lint:
  27. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  28. runs-on: ubuntu-latest
  29. steps:
  30. - uses: actions/checkout@v3
  31. - name: Set up environment
  32. uses: ./.github/actions/setup
  33. - run: npm run lint
  34. tests:
  35. runs-on: ubuntu-latest
  36. env:
  37. FORCE_COLOR: 1
  38. GAS: true
  39. steps:
  40. - uses: actions/checkout@v3
  41. - name: Set up environment
  42. uses: ./.github/actions/setup
  43. - name: Run tests and generate gas report
  44. run: npm run test
  45. - name: Check linearisation of the inheritance graph
  46. run: npm run test:inheritance
  47. - name: Check proceduraly generated contracts are up-to-date
  48. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  49. run: npm run test:generation
  50. - name: Compare gas costs
  51. uses: ./.github/actions/gas-compare
  52. with:
  53. token: ${{ github.token }}
  54. coverage:
  55. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  56. runs-on: ubuntu-latest
  57. steps:
  58. - uses: actions/checkout@v3
  59. - name: Set up environment
  60. uses: ./.github/actions/setup
  61. - run: npm run coverage
  62. env:
  63. NODE_OPTIONS: --max_old_space_size=4096
  64. - uses: codecov/codecov-action@v3
  65. slither:
  66. if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
  67. runs-on: ubuntu-latest
  68. steps:
  69. - uses: actions/checkout@v3
  70. - name: Set up environment
  71. uses: ./.github/actions/setup
  72. - uses: crytic/slither-action@v0.1.1