run_relup_tests.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. name: Release Upgrade Tests
  2. concurrency:
  3. group: relup-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. branches:
  8. - '**'
  9. tags:
  10. - v*
  11. - e*
  12. pull_request:
  13. jobs:
  14. relup_test:
  15. runs-on: aws-amd64
  16. strategy:
  17. matrix:
  18. profile:
  19. - emqx
  20. - emqx-enterprise
  21. otp:
  22. - 24.2.1-1
  23. # no need to use more than 1 version of Elixir, since tests
  24. # run using only Erlang code. This is needed just to specify
  25. # the base image.
  26. elixir:
  27. - 1.13.4
  28. os:
  29. - ubuntu20.04
  30. arch:
  31. - amd64
  32. container: "ghcr.io/emqx/emqx-builder/5.0-16:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
  33. defaults:
  34. run:
  35. shell: bash
  36. steps:
  37. - uses: AutoModality/action-clean@v1
  38. - uses: actions/setup-python@v2
  39. with:
  40. python-version: '3.8'
  41. architecture: 'x64'
  42. - uses: actions/checkout@v2
  43. with:
  44. repository: emqx/paho.mqtt.testing
  45. ref: develop-4.0
  46. path: paho.mqtt.testing
  47. - uses: actions/checkout@v2
  48. with:
  49. repository: emqx/emqtt-bench
  50. ref: 0.3.4
  51. path: emqtt-bench
  52. - uses: actions/checkout@v2
  53. with:
  54. repository: hawk/lux
  55. ref: lux-2.6
  56. path: lux
  57. - uses: actions/checkout@v2
  58. with:
  59. repository: ${{ github.repository }}
  60. path: emqx
  61. fetch-depth: 0
  62. - name: Get old vsn
  63. run: |
  64. echo "OLD_VSNS=$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)" >> $GITHUB_ENV
  65. echo "VSN=$(emqx/pkg-vsn.sh ${{ matrix.profile }})" >> $GITHUB_ENV
  66. - name: build emqx
  67. env:
  68. PROFILE: ${{ matrix.profile }}
  69. run: make -C emqx ${PROFILE}-tgz
  70. - name: build emqtt-bench
  71. run: make -C emqtt-bench
  72. - name: build lux
  73. run: |
  74. set -e -u -x
  75. cd lux
  76. autoconf
  77. ./configure
  78. make
  79. make install
  80. - name: run relup test
  81. env:
  82. PROFILE: ${{ matrix.profile }}
  83. timeout-minutes: 20
  84. run: |
  85. set -e -x -u
  86. if [ -n "$OLD_VSNS" ]; then
  87. mkdir -p packages
  88. cp emqx/_packages/${PROFILE}/*.tar.gz packages
  89. cp emqx/_upgrade_base/*.tar.gz packages
  90. lux \
  91. --case_timeout infinity \
  92. --var PROFILE=$PROFILE \
  93. --var PACKAGE_PATH=$(pwd)/packages \
  94. --var BENCH_PATH=$(pwd)/emqtt-bench \
  95. --var VSN="$VSN" \
  96. --var OLD_VSNS="$OLD_VSNS" \
  97. emqx/.ci/fvt_tests/relup.lux
  98. fi
  99. - uses: actions/upload-artifact@v1
  100. if: failure()
  101. with:
  102. name: lux_logs
  103. path: lux_logs