static_checks.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. permissions:
  20. contents: read
  21. jobs:
  22. static_checks:
  23. runs-on: ${{ fromJSON(inputs.runner_labels) }}
  24. name: "static_checks (${{ matrix.profile }})"
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. include: ${{ fromJson(inputs.ct-matrix) }}
  29. container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
  30. steps:
  31. - uses: actions/download-artifact@v3
  32. with:
  33. name: ${{ matrix.profile }}
  34. - name: extract artifact
  35. run: |
  36. unzip -o -q ${{ matrix.profile }}.zip
  37. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  38. - uses: actions/cache@v3
  39. with:
  40. path: "emqx_dialyzer_${{ matrix.otp }}_plt"
  41. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*') }}
  42. restore-keys: |
  43. rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
  44. - run: cat .env | tee -a $GITHUB_ENV
  45. - name: run static checks
  46. run: make static_checks