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