@@ -114,6 +114,27 @@ jobs:
114114 SQLSERVER_PASS : ' ${{ steps.secrets.outputs.SQLSERVER_PASS }}'
115115 SQLSERVER_DB : ' ${{ steps.secrets.outputs.SQLSERVER_DB }}'
116116 run : nox -s system-${{ matrix.python-version }}
117+
118+ - name : FlakyBot (Linux)
119+ # only run flakybot on periodic (schedule) and continuous (push) events
120+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
121+ run : |
122+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
123+ chmod +x ./flakybot
124+ ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
125+ - name : FlakyBot (Windows)
126+ # only run flakybot on periodic (schedule) and continuous (push) events
127+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
128+ run : |
129+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L
130+ ./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
131+ - name : FlakyBot (macOS)
132+ # only run flakybot on periodic (schedule) and continuous (push) events
133+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
134+ run : |
135+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
136+ chmod +x ./flakybot
137+ ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
117138
118139 unit :
119140 # 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)
@@ -125,6 +146,9 @@ jobs:
125146 os : [macos-latest, windows-latest, ubuntu-latest]
126147 python-version : ["3.7", "3.8", "3.9", "3.10"]
127148 fail-fast : false
149+ permissions :
150+ contents : ' read'
151+ id-token : ' write'
128152 steps :
129153 - name : Remove PR label
130154 if : " ${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
@@ -157,5 +181,34 @@ jobs:
157181 - name : Install nox
158182 run : pip install nox
159183
184+ - id : ' auth'
185+ name : ' Authenticate to Google Cloud'
186+ uses : ' google-github-actions/auth@v0.8.1'
187+ with :
188+ workload_identity_provider : ${{ secrets.PROVIDER_NAME }}
189+ service_account : ${{ secrets.SERVICE_ACCOUNT }}
190+ access_token_lifetime : 600s
191+
160192 - name : Run tests
161193 run : nox -s unit-${{ matrix.python-version }}
194+
195+ - name : FlakyBot (Linux)
196+ # only run flakybot on periodic (schedule) and continuous (push) events
197+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
198+ run : |
199+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
200+ chmod +x ./flakybot
201+ ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
202+ - name : FlakyBot (Windows)
203+ # only run flakybot on periodic (schedule) and continuous (push) events
204+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
205+ run : |
206+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L
207+ ./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
208+ - name : FlakyBot (macOS)
209+ # only run flakybot on periodic (schedule) and continuous (push) events
210+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
211+ run : |
212+ curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
213+ chmod +x ./flakybot
214+ ./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
0 commit comments