Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Nov 20, 2024
1 parent 4ce0873 commit e7817d8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,22 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test
- name: Test with retry
if: matrix.os != 'ubuntu-latest'
run: go test -v ./pkg/...
run: |
attempt=0
max_attempts=3
until [ $attempt -ge $max_attempts ]
do
go test -v ./pkg/... && break
attempt=$((attempt+1))
echo "Test failed, retrying ($attempt/$max_attempts)..."
if [ $attempt -ge $max_attempts ]; then
echo "Test failed after $max_attempts attempts"
exit 1
fi
sleep 10
done
- name: Test with coverage
if: matrix.os == 'ubuntu-latest'
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./pkg/...
Expand Down

0 comments on commit e7817d8

Please sign in to comment.