Skip to content

Commit e05340d

Browse files
committed
Add a "nightly" github actions workflow
To run tests so that breaking changes in rabbitmq-server are detected
1 parent 0df54e4 commit e05340d

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test (Nightly)
2+
on:
3+
schedule:
4+
- cron: '0 3 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
bazel_otp_name:
13+
- "25"
14+
branch:
15+
- main
16+
- v3.12.x
17+
- v3.11.x
18+
steps:
19+
- name: CHECKOUT
20+
uses: actions/checkout@v3
21+
with:
22+
ref: ${{ matrix.branch }}
23+
- name: MOUNT BAZEL CACHE
24+
uses: actions/cache@v3.3.1
25+
with:
26+
path: "/home/runner/repo-cache/"
27+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE.bazel') }}
28+
restore-keys: |
29+
${{ runner.os }}-repo-cache-
30+
- name: CONFIGURE BAZEL
31+
run: |
32+
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
33+
cat << EOF >> user.bazelrc
34+
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
35+
EOF
36+
fi
37+
cat << EOF >> user.bazelrc
38+
build:buildbuddy --build_metadata=ROLE=CI
39+
build:buildbuddy --build_metadata=VISIBILITY=PUBLIC
40+
build:buildbuddy --repository_cache=/home/runner/repo-cache/
41+
build:buildbuddy --color=yes
42+
build:buildbuddy --disk_cache=
43+
EOF
44+
45+
bazelisk info release
46+
- name: CONFIGURE rabbitmq-server BRANCH
47+
run: |
48+
sudo npm install --global --silent @bazel/buildozer
49+
50+
branch="${{ matrix.branch }}"
51+
version="${branch#v}"
52+
53+
echo "$(cat MODULE.bazel | buildozer 'set strip_prefix "rabbitmq-server-'${version}'"' -:%archive_override)" > MODULE.bazel
54+
echo "$(cat MODULE.bazel | buildozer 'set urls ["https://github.com/rabbitmq/rabbitmq-server/archive/refs/heads/${{ matrix.branch }}.zip"]' -:%archive_override)" > MODULE.bazel
55+
56+
git diff
57+
- name: TEST
58+
run: |
59+
bazelisk test //... \
60+
--config=rbe-${{ matrix.bazel_otp_name }} \
61+
--verbose_failures
62+
summary:
63+
needs:
64+
- test
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: SUMMARY
68+
run: |
69+
echo "SUCCESS"

0 commit comments

Comments
 (0)