diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 68fe3f3d..ba8b6c6e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -105,6 +105,14 @@ jobs: go install github.com/jstemmer/go-junit-report/v2@latest go-junit-report -in test_results.txt -set-exit-code -out integration_sponge_log.xml + - name: FlakyBot + # only run flakybot on periodic (schedule) and continuous (push) events + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && always() }} + run: | + curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L + chmod +x ./flakybot + ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} + unit: # run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label) if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}" @@ -186,3 +194,24 @@ jobs: run: | go install github.com/jstemmer/go-junit-report/v2@latest go-junit-report -in test_results.txt -set-exit-code -out unit_sponge_log.xml + + - name: FlakyBot (Linux) + # only run flakybot on periodic (schedule) and continuous (push) events + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }} + run: | + curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L + chmod +x ./flakybot + ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} + - name: FlakyBot (Windows) + # only run flakybot on periodic (schedule) and continuous (push) events + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }} + run: | + curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L + ./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} + - name: FlakyBot (macOS) + # only run flakybot on periodic (schedule) and continuous (push) events + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }} + run: | + curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L + chmod +x ./flakybot + ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}