static_checks.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
  27. steps:
  28. - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
  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@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
  36. with:
  37. path: "emqx_dialyzer_${{ matrix.otp }}_plt"
  38. key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*') }}
  39. restore-keys: |
  40. rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
  41. - run: cat .env | tee -a $GITHUB_ENV
  42. - name: run static checks
  43. run: make static_checks