Skip to content

Commit 117aef3

Browse files
ci: re-enable flakybot (#893)
1 parent f61bdee commit 117aef3

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/tests.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,28 @@ jobs:
123123
SQLSERVER_PASS: '${{ steps.secrets.outputs.SQLSERVER_PASS }}'
124124
SQLSERVER_DB: '${{ steps.secrets.outputs.SQLSERVER_DB }}'
125125
run: nox -s system-${{ matrix.python-version }}
126-
126+
127+
- name: FlakyBot (Linux)
128+
# only run flakybot on periodic (schedule) and continuous (push) events
129+
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
130+
run: |
131+
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
132+
chmod +x ./flakybot
133+
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
134+
- name: FlakyBot (Windows)
135+
# only run flakybot on periodic (schedule) and continuous (push) events
136+
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
137+
run: |
138+
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L
139+
./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
140+
- name: FlakyBot (macOS)
141+
# only run flakybot on periodic (schedule) and continuous (push) events
142+
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
143+
run: |
144+
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
145+
chmod +x ./flakybot
146+
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
147+
127148
unit:
128149
# 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)
129150
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' }}"
@@ -182,3 +203,12 @@ jobs:
182203

183204
- name: Run tests
184205
run: nox -s unit-${{ matrix.python-version }}
206+
207+
- name: FlakyBot (Linux)
208+
# only run flakybot on periodic (schedule) and continuous (push) events
209+
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
210+
run: |
211+
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
212+
chmod +x ./flakybot
213+
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
214+

0 commit comments

Comments
 (0)