static_checks.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_labels:
  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: ${{ fromJSON(inputs.runner_labels) }}
  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: actions/download-artifact@v3
  30. with:
  31. name: ${{ matrix.profile }}
  32. - name: extract artifact
  33. run: |
  34. unzip -o -q ${{ matrix.profile }}.zip
  35. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  36. - uses: actions/cache@v3
  37. with:
  38. path: "emqx_dialyzer_${{ matrix.otp }}_plt"
  39. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*', 'lib-ee/*/rebar.*') }}
  40. restore-keys: |
  41. rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
  42. - name: run static checks
  43. env:
  44. PROFILE: ${{ matrix.profile }}
  45. run: make static_checks