Skip to content

Commit f4e8b4b

Browse files
Split managment-ui workflow into two
one for push to main and other branches which runs a short suite but against a 3 node cluster and another for PRs which run a full suite of tests but against a single node
1 parent 9613856 commit f4e8b4b

File tree

3 files changed

+105
-19
lines changed

3 files changed

+105
-19
lines changed

.github/workflows/test-authnz.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- erlang_version: "26.2"
4343
elixir_version: 1.15.7
4444
env:
45-
SELENIUM_DIR: deps/rabbitmq_management/selenium
45+
SELENIUM_DIR: selenium
4646
DOCKER_NETWORK: rabbitmq_net
4747
steps:
4848
- name: Checkout
@@ -91,7 +91,8 @@ jobs:
9191
9292
- name: Run Suites
9393
run: |
94-
RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq-amd64 ${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
94+
RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq-amd64 \
95+
${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
9596
9697
- name: Upload Test Artifacts
9798
if: always()
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Test Management UI with Selenium for PRs
2+
on:
3+
paths:
4+
- 'deps/**'
5+
- 'selenium/**'
6+
- .github/workflows/test-management-ui-for-pr.yaml
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
jobs:
11+
selenium:
12+
runs-on: ubuntu-22.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
erlang_version:
17+
- "26.2"
18+
browser:
19+
- chrome
20+
include:
21+
- erlang_version: "26.2"
22+
elixir_version: 1.15.7
23+
env:
24+
SELENIUM_DIR: selenium
25+
DOCKER_NETWORK: rabbitmq_net
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Configure OTP & Elixir
31+
uses: erlef/setup-beam@v1.17
32+
with:
33+
otp-version: ${{ matrix.erlang_version }}
34+
elixir-version: ${{ matrix.elixir_version }}
35+
hexpm-mirrors: |
36+
https://builds.hex.pm
37+
https://cdn.jsdelivr.net/hex
38+
39+
- name: Authenticate To Google Cloud
40+
uses: google-github-actions/auth@v2.1.5
41+
with:
42+
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
43+
44+
- name: Configure Bazel
45+
run: |
46+
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
47+
cat << EOF >> user.bazelrc
48+
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
49+
build --google_default_credentials
50+
51+
build --remote_download_toplevel
52+
EOF
53+
fi
54+
cat << EOF >> user.bazelrc
55+
build --color=yes
56+
EOF
57+
58+
- name: Build & Load RabbitMQ OCI
59+
run: |
60+
bazelisk run packaging/docker-image:rabbitmq-amd64
61+
62+
- name: Configure Docker Network
63+
run: |
64+
docker network create ${DOCKER_NETWORK}
65+
66+
- name: Build Test Runner Image
67+
run: |
68+
cd ${SELENIUM_DIR}
69+
docker build -t mocha-test --target test .
70+
71+
- name: Run full ui suites on a standalone rabbitmq server
72+
run: |
73+
RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq-amd64 \
74+
${SELENIUM_DIR}/run-suites.sh
75+
mkdir -p /tmp/full-suite
76+
mv /tmp/selenium/* /tmp/full-suite
77+
mkdir -p /tmp/full-suite/logs
78+
mv ${SELENIUM_DIR}/logs/* /tmp/full-suite/logs
79+
mkdir -p /tmp/full-suite/screens
80+
mv ${SELENIUM_DIR}/screens/* /tmp/full-suite/screens
81+
82+
- name: Upload Test Artifacts
83+
if: always()
84+
uses: actions/upload-artifact@v4.3.2
85+
with:
86+
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
87+
path: |
88+
/tmp/full-suite
89+
/tmp/short-suite
90+
91+
summary-selenium:
92+
needs:
93+
- selenium
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: SUMMARY
97+
run: |
98+
echo "SUCCESS"

.github/workflows/test-selenium.yaml renamed to .github/workflows/test-management-ui.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ on:
1616
- BUILD.*
1717
- '*.bzl'
1818
- '*.bazel'
19-
- .github/workflows/test-selenium.yaml
20-
pull_request:
21-
paths:
22-
- 'deps/rabbitmq_management/**'
23-
- .github/workflows/test-selenium-for-pull-requests.yaml
19+
- 'selenium/**'
20+
- .github/workflows/test-management-ui.yaml
21+
2422
concurrency:
2523
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2624
cancel-in-progress: true
@@ -38,7 +36,7 @@ jobs:
3836
- erlang_version: "26.2"
3937
elixir_version: 1.15.7
4038
env:
41-
SELENIUM_DIR: deps/rabbitmq_management/selenium
39+
SELENIUM_DIR: selenium
4240
DOCKER_NETWORK: rabbitmq_net
4341
steps:
4442
- name: Checkout
@@ -85,17 +83,6 @@ jobs:
8583
cd ${SELENIUM_DIR}
8684
docker build -t mocha-test --target test .
8785
88-
- name: Run full ui suites on a standalone rabbitmq server
89-
run: |
90-
RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq-amd64 \
91-
${SELENIUM_DIR}/run-suites.sh
92-
mkdir -p /tmp/full-suite
93-
mv /tmp/selenium/* /tmp/full-suite
94-
mkdir -p /tmp/full-suite/logs
95-
mv ${SELENIUM_DIR}/logs/* /tmp/full-suite/logs
96-
mkdir -p /tmp/full-suite/screens
97-
mv ${SELENIUM_DIR}/screens/* /tmp/full-suite/screens
98-
9986
- name: Run short ui suite on a 3-node rabbitmq cluster
10087
run: |
10188
RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq-amd64 \

0 commit comments

Comments
 (0)