Skip to content

Commit f296ca9

Browse files
authored
[java] Using retries due to GitHub actions env (#10280)
1 parent 50801b1 commit f296ca9

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: 'Run bazel query and pass found targets to bazel test'
22
inputs:
3-
query: # id of input
3+
query: # id of input
44
required: true
5+
attempts:
6+
required: false
7+
default: 1
58
runs:
69
using: "composite"
710
steps:
811
- run: |
912
cp .github/.bazelrc.local .
10-
bazel query "${{ inputs.query }}" | xargs bazel test
13+
bazel query "${{ inputs.query }}" | xargs bazel test --flaky_test_attempts=${{ inputs.attempts }}
1114
shell: bash

.github/workflows/java.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
uses: ./.github/actions/bazel-test
136136
with:
137137
query: attr(tags, ${{ matrix.browser }}, tests(//java/...)) except attr(tags, 'lint|rc|remote', tests(//java/...))
138+
attempts: 3
138139
env:
139140
DISPLAY: :99
140141

@@ -175,6 +176,7 @@ jobs:
175176
uses: ./.github/actions/bazel-test
176177
with:
177178
query: attr(tags, ${{ matrix.browser }}, tests(//java/...)) intersect attr(tags, 'remote', tests(//java/...))
179+
attempts: 3
178180
env:
179181
DISPLAY: :99
180182

@@ -205,11 +207,10 @@ jobs:
205207
- name: Start XVFB
206208
run: Xvfb :99 &
207209
- name: Run browser tests in Firefox
208-
uses: nick-invision/retry@v2
210+
uses: ./.github/actions/bazel-test
209211
with:
210-
timeout_minutes: 20
211-
max_attempts: 3
212-
command: bazel query "attr(tags, rc, tests(//java/...))" | xargs bazel test
212+
query: attr(tags, rc, tests(//java/...))
213+
attempts: 3
213214
env:
214215
DISPLAY: :99
215216

0 commit comments

Comments
 (0)