run_emqx_app_tests.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: Check emqx app standalone
  2. ## apps/emqx can be used as a rebar/mix dependency
  3. ## in other project, so we need to make sure apps/emqx
  4. ## as an Erlang/Elixir app works standalone
  5. on:
  6. push:
  7. branches:
  8. - '**'
  9. tags:
  10. - v*
  11. - e*
  12. pull_request:
  13. jobs:
  14. check_all:
  15. strategy:
  16. matrix:
  17. otp:
  18. - 23.3.4.9-4
  19. - 24.2.1-1
  20. # no need to use more than 1 version of Elixir, since tests
  21. # run using only Erlang code. This is needed just to specify
  22. # the base image.
  23. elixir:
  24. - 1.13.3
  25. os:
  26. - ubuntu20.04
  27. arch:
  28. - amd64
  29. runs-on: ubuntu-20.04
  30. container: "ghcr.io/emqx/emqx-builder/5.0-8:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}"
  31. steps:
  32. - uses: actions/checkout@v2
  33. - name: Get deps git refs for cache
  34. id: deps-refs
  35. run: |
  36. PATH=$PATH:./ scripts/get-dep-refs.sh
  37. make clean-all
  38. - name: load rocksdb cache
  39. uses: actions/cache@v2
  40. with:
  41. path: _build/default/lib/rocksdb/
  42. key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
  43. - name: load quicer cache
  44. uses: actions/cache@v2
  45. with:
  46. path: _build/default/lib/quicer/
  47. key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
  48. - name: run
  49. run: |
  50. make ensure-rebar3
  51. cp rebar3 apps/emqx/
  52. cd apps/emqx
  53. ./rebar3 xref
  54. ./rebar3 dialyzer
  55. ./rebar3 eunit -v
  56. ./rebar3 ct -v
  57. ./rebar3 proper -d test/props
  58. - uses: actions/upload-artifact@v1
  59. if: failure()
  60. with:
  61. name: logs
  62. path: apps/emqx/_build/test/logs