blob: 812a307365778e9951a39f2bc55fb5e71982f61d (
plain)
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
99
100
101
102
103
|
name: Test Mixed Version Clusters
on:
push:
branches:
- master
- v3.9.x
- v3.8.x
- bump-rbe-image-*
- bump-otp-for-oci
- bump-rabbitmq-ct-helpers
paths:
- 'deps/**'
- 'scripts/**'
- Makefile
- plugins.mk
- rabbitmq-components.mk
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- .github/workflows/test-mixed-versions.yaml
workflow_dispatch:
jobs:
test-mixed-versions:
name: Test (Mixed Version Cluster)
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
erlang_version:
- "23"
- "24"
timeout-minutes: 120
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v2.3.5
- name: CONFIGURE BAZEL
run: |
echo "${{ secrets.BUILDBUDDY_CERT }}" > buildbuddy-cert.pem
echo "${{ secrets.BUILDBUDDY_KEY }}" > buildbuddy-key.pem
cat << EOF >> user.bazelrc
build:buildbuddy --tls_client_certificate=buildbuddy-cert.pem
build:buildbuddy --tls_client_key=buildbuddy-key.pem
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PUBLIC
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-${{ matrix.erlang_version }}
EOF
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN TESTS
run: |
bazelisk test //... \
--config=rbe-${{ matrix.erlang_version }} \
--test_tag_filters=mixed-version-cluster,-exclusive,-aws \
--verbose_failures
test-exclusive-mixed-versions:
name: Test (Exclusive Tests with Mixed Version Cluster)
runs-on: ubuntu-18.04
strategy:
matrix:
erlang_version:
- "23"
- "24"
timeout-minutes: 60
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v2.3.5
- name: CONFIGURE OTP & ELIXIR
uses: erlef/setup-beam@v1.9
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: 1.11.4
- name: CONFIGURE BAZEL
run: |
ERLANG_HOME="$(dirname $(dirname $(which erl)))"
ELIXIR_HOME="$(dirname $(dirname $(which iex)))"
echo "${{ secrets.BUILDBUDDY_CERT }}" > buildbuddy-cert.pem
echo "${{ secrets.BUILDBUDDY_KEY }}" > buildbuddy-key.pem
cat << EOF >> user.bazelrc
build:buildbuddy --tls_client_certificate=buildbuddy-cert.pem
build:buildbuddy --tls_client_key=buildbuddy-key.pem
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-exclusive-${{ matrix.erlang_version }}
build --@bazel-erlang//:erlang_version=${{ matrix.erlang_version }}
build --@bazel-erlang//:erlang_home=${ERLANG_HOME}
build --//:elixir_home=${ELIXIR_HOME}
EOF
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN EXCLUSIVE TESTS
run: |
MIXED_EXCLUSIVE_TESTS=$(bazel query 'attr(tags, "mixed-version-cluster", attr(tags, "exclusive", tests(//...)))')
bazelisk test $MIXED_EXCLUSIVE_TESTS \
--config=buildbuddy \
--test_tag_filters=-aws \
--build_tests_only \
--test_env RABBITMQ_CT_HELPERS_DELETE_UNUSED_NODES=true \
--verbose_failures
|