File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -204,3 +204,27 @@ jobs:
204204 license : ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}
205205 testim-access-token : ${{ secrets.TESTIM_ACCESS_TOKEN }}
206206 testim-branch : ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
207+
208+
209+ # this job will validate that all the tests passed
210+ # it is used for the github branch protection rule
211+ validate-success :
212+ runs-on : ubuntu-20.04
213+ needs :
214+ - e2e
215+ - sanitize
216+ - tests
217+ if : always()
218+ steps :
219+ # https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
220+ - name : fail if e2e job was not successful
221+ if : needs.e2e.result != 'success'
222+ run : exit 1
223+ - name : fail if sanitize job was not successful
224+ if : needs.sanitize.result != 'success'
225+ run : exit 1
226+ - name : fail if tests job was not successful
227+ if : needs.tests.result != 'success'
228+ run : exit 1
229+ - name : succeed if everything else passed
230+ run : echo "Validation succeeded"
You can’t perform that action at this time.
0 commit comments