forked from apache/rocketmq
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 936 Bytes
/
bazel.yml
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
name: Build and Run Tests by Bazel
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- master
- develop
- bazel
permissions:
actions: write
jobs:
build:
name: "bazel-compile (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Build
run: bazel build --config=remote //...
- name: Run Tests
run: bazel test --config=remote //...
- name: Retry if failed
# if it failed , retry 2 times at most
if: failure() && fromJSON(github.run_attempt) < 3
continue-on-error: true
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Attempting to retry workflow..."
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}