Skip to content

Commit

Permalink
chore(ci): retry on error to prevent potential flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
rkettelerij committed Sep 16, 2024
1 parent d713c67 commit 1459fe3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ jobs:
run: go build -v ./...

- name: Unit Test
run: |
go test -v -shuffle=on -coverpkg "$(go list || go list -m | head -1)/..." -coverprofile cover.out.tmp ./...
# remove generate code from coverage results
grep -v "zz_generated" cover.out.tmp > cover.out
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 2
retry_on: error
command: |
go test -v -shuffle=on -coverpkg "$(go list || go list -m | head -1)/..." -coverprofile cover.out.tmp ./...
# remove generate code from coverage results
grep -v "zz_generated" cover.out.tmp > cover.out
- name: Test generating example CRD
run: hack/generate-crd.sh
Expand Down

0 comments on commit 1459fe3

Please sign in to comment.