static_checks.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. permissions:
  17. contents: read
  18. jobs:
  19. static_checks:
  20. runs-on: ${{ github.repository_owner == 'emqx' && fromJSON('["self-hosted","ephemeral","linux","x64"]') || 'ubuntu-22.04' }}
  21. name: "static_checks (${{ matrix.profile }})"
  22. strategy:
  23. fail-fast: false
  24. matrix:
  25. include: ${{ fromJson(inputs.ct-matrix) }}
  26. container: "${{ inputs.builder }}"
  27. steps:
  28. - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
  29. with:
  30. name: ${{ matrix.profile }}
  31. - name: extract artifact
  32. run: |
  33. unzip -o -q ${{ matrix.profile }}.zip
  34. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  35. - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
  36. with:
  37. path: "emqx_dialyzer_${{ matrix.profile }}_plt"
  38. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*') }}
  39. restore-keys: |
  40. rebar3-dialyzer-plt-${{ matrix.profile }}-
  41. - name: run static checks
  42. run: make static_checks