static_checks.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Static checks
  2. concurrency:
  3. group: static-checks-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. workflow_call:
  7. inputs:
  8. runner:
  9. required: true
  10. type: string
  11. builder:
  12. required: true
  13. type: string
  14. ct-matrix:
  15. required: true
  16. type: string
  17. env:
  18. IS_CI: "yes"
  19. jobs:
  20. static_checks:
  21. runs-on: ${{ inputs.runner }}
  22. name: "static_checks (${{ matrix.profile }})"
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. include: ${{ fromJson(inputs.ct-matrix) }}
  27. container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
  28. steps:
  29. - uses: AutoModality/action-clean@v1
  30. - uses: actions/download-artifact@v3
  31. with:
  32. name: ${{ matrix.profile }}
  33. - name: extract artifact
  34. run: |
  35. unzip -o -q ${{ matrix.profile }}.zip
  36. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  37. - uses: actions/cache@v3
  38. with:
  39. path: "emqx_dialyzer_${{ matrix.otp }}_plt"
  40. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*', 'lib-ee/*/rebar.*') }}
  41. restore-keys: |
  42. rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
  43. - name: run static checks
  44. env:
  45. PROFILE: ${{ matrix.profile }}
  46. run: make static_checks