Bumps the actions group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.1.2` | `4.1.7` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.3.3` | `4.3.5` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `4.1.7` | `4.1.8` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.0.0` | `3.2.0` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.3.0` | `3.6.1` | | [docker/login-action](https://github.com/docker/login-action) | `3.2.0` | `3.3.0` | | [erlef/setup-beam](https://github.com/erlef/setup-beam) | `1.18.0` | `1.18.1` | | [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.3.3` | `2.4.0` | Updates `actions/checkout` from 4.1.2 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.2...692973e3d937129bcbf40652eb9f2f61becf3332) Updates `actions/upload-artifact` from 4.3.3 to 4.3.5 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](65462800fd...89ef406dd8) Updates `actions/download-artifact` from 4.1.7 to 4.1.8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](65a9edc588...fa0a91b85d) Updates `docker/setup-qemu-action` from 3.0.0 to 3.2.0 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](68827325e0...49b3bc8e6b) Updates `docker/setup-buildx-action` from 3.3.0 to 3.6.1 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](d70bba72b1...988b5a0280) Updates `docker/login-action` from 3.2.0 to 3.3.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](0d4c9c5ea7...9780b0c442) Updates `erlef/setup-beam` from 1.18.0 to 1.18.1 - [Release notes](https://github.com/erlef/setup-beam/releases) - [Commits](a6e26b2231...b9c58b0450) Updates `ossf/scorecard-action` from 2.3.3 to 2.4.0 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](dc50aa9510...62b2cac7ed) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: erlef/setup-beam dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
123 lines
4.5 KiB
YAML
123 lines
4.5 KiB
YAML
name: Docker image tests
|
|
|
|
concurrency:
|
|
group: docker-tests-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
basic-tests:
|
|
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
profile:
|
|
- ["emqx", "emqx/emqx:5.0.16"]
|
|
- ["emqx-enterprise", "emqx/emqx-enterprise:5.0.1"]
|
|
|
|
env:
|
|
EMQX_NAME: ${{ matrix.profile[0] }}
|
|
EMQX_IMAGE_OLD_VERSION_TAG: ${{ matrix.profile[1] }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
- name: Set up environment
|
|
id: env
|
|
run: |
|
|
source env.sh
|
|
PKG_VSN=$(docker run --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u) "$EMQX_BUILDER" ./pkg-vsn.sh "$EMQX_NAME")
|
|
echo "PKG_VSN=$PKG_VSN" >> "$GITHUB_ENV"
|
|
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: ${{ env.EMQX_NAME }}-docker
|
|
path: /tmp
|
|
- name: load docker image
|
|
run: |
|
|
_EMQX_DOCKER_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-docker-${PKG_VSN}.tar.gz 2>/dev/null | sed 's/Loaded image: //g')
|
|
echo "_EMQX_DOCKER_IMAGE_TAG=$_EMQX_DOCKER_IMAGE_TAG" >> $GITHUB_ENV
|
|
- name: dashboard tests
|
|
working-directory: ./scripts/ui-tests
|
|
run: |
|
|
set -eu
|
|
docker compose up --abort-on-container-exit --exit-code-from selenium
|
|
- name: test two nodes cluster with proto_dist=inet_tls in docker
|
|
run: |
|
|
## -d 1 means only put node 1 (latest version) behind haproxy
|
|
./scripts/test/start-two-nodes-in-docker.sh -d 1 -P $_EMQX_DOCKER_IMAGE_TAG $EMQX_IMAGE_OLD_VERSION_TAG
|
|
HTTP_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "18083/tcp") 0).HostPort}}' haproxy)
|
|
./scripts/test/emqx-smoke-test.sh localhost $HTTP_PORT
|
|
## -c menas 'cleanup'
|
|
./scripts/test/start-two-nodes-in-docker.sh -c
|
|
- name: cleanup
|
|
if: always()
|
|
working-directory: ./scripts/ui-tests
|
|
run: |
|
|
docker compose rm -fs
|
|
|
|
paho-mqtt-testing:
|
|
runs-on: ${{ github.repository_owner == 'emqx' && fromJSON('["self-hosted","ephemeral","linux","x64"]') || 'ubuntu-22.04' }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
env:
|
|
EMQX_NAME: ${{ matrix.profile }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
profile:
|
|
- emqx
|
|
- emqx-enterprise
|
|
- emqx-elixir
|
|
steps:
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
- name: Set up environment
|
|
id: env
|
|
run: |
|
|
source env.sh
|
|
if [ "$EMQX_NAME" = "emqx-enterprise" ]; then
|
|
_EMQX_TEST_DB_BACKEND='rlog'
|
|
else
|
|
_EMQX_TEST_DB_BACKEND='mnesia'
|
|
fi
|
|
PKG_VSN=$(docker run --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u) "$EMQX_BUILDER" ./pkg-vsn.sh "$EMQX_NAME")
|
|
echo "PKG_VSN=$PKG_VSN" >> "$GITHUB_ENV"
|
|
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: ${{ env.EMQX_NAME }}-docker
|
|
path: /tmp
|
|
- name: load docker image
|
|
run: |
|
|
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-docker-${PKG_VSN}.tar.gz 2>/dev/null | sed 's/Loaded image: //g')
|
|
echo "_EMQX_DOCKER_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
|
|
- name: run emqx
|
|
timeout-minutes: 5
|
|
run: |
|
|
./.ci/docker-compose-file/scripts/run-emqx.sh $_EMQX_DOCKER_IMAGE_TAG $_EMQX_TEST_DB_BACKEND
|
|
- name: make paho tests
|
|
run: |
|
|
if ! docker exec -i python /scripts/pytest.sh "$_EMQX_TEST_DB_BACKEND"; then
|
|
echo "DUMP_CONTAINER_LOGS_BGN"
|
|
echo "============== haproxy =============="
|
|
docker logs haproxy
|
|
echo "============== node1 =============="
|
|
docker logs node1.emqx.io
|
|
echo "============== node2 =============="
|
|
docker logs node2.emqx.io
|
|
echo "DUMP_CONTAINER_LOGS_END"
|
|
exit 1
|
|
fi
|
|
# simple smoke test for node_dump
|
|
- name: test node_dump
|
|
run: |
|
|
docker exec -t -u root node1.emqx.io bash -c 'apt-get -y update && apt-get -y install net-tools'
|
|
docker exec -t -u root node1.emqx.io node_dump
|