static_checks.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. builder:
  9. required: true
  10. type: string
  11. ct-matrix:
  12. required: true
  13. type: string
  14. env:
  15. IS_CI: "yes"
  16. jobs:
  17. static_checks:
  18. runs-on: ${{ github.repository_owner == 'emqx' && fromJSON('["self-hosted","ephemeral","linux","x64"]') || 'ubuntu-22.04' }}
  19. name: "static_checks (${{ matrix.profile }})"
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. include: ${{ fromJson(inputs.ct-matrix) }}
  24. container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
  25. steps:
  26. - uses: actions/download-artifact@v3
  27. with:
  28. name: ${{ matrix.profile }}
  29. - name: extract artifact
  30. run: |
  31. unzip -o -q ${{ matrix.profile }}.zip
  32. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  33. - uses: actions/cache@v3
  34. with:
  35. path: "emqx_dialyzer_${{ matrix.otp }}_plt"
  36. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*', 'lib-ee/*/rebar.*') }}
  37. restore-keys: |
  38. rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
  39. - name: run static checks
  40. env:
  41. PROFILE: ${{ matrix.profile }}
  42. run: make static_checks