Add go-tests-success job and make go-test-enterprise conditional

jm/success
John Murret 2023-04-06 11:33:58 -06:00
parent 1794484298
commit b95230eedc
1 changed files with 36 additions and 0 deletions

View File

@ -227,6 +227,7 @@ jobs:
consul-license: ${{secrets.CONSUL_LICENSE}}
go-test-enterprise:
if: ${{ endsWith(github.repository, '-enterprise') }}
needs:
- setup
- dev-build
@ -361,3 +362,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: "echo ok"
# This is job is required for branch protection as a required gihub check
# because GitHub actions show up as checks at the job level and not the
# workflow level. This is currently a feature request:
# https://github.com/orgs/community/discussions/12395
#
# This job must:
# - be placed after the fanout of a workflow so that everything fans back in
# to this job.
# - "need" any job that is part of the fan out / fan in
# - implement the if logic because we have conditional jobs
# (go-test-enteprise) that this job needs and this would potentially get
# skipped if a previous job got skipped. So we use the if clause to make
# sure it does not get skipped.
go-tests-success:
needs:
- lint
- lint32bit
- go-test-enterprise
- go-test-oss
- go-test-race
- go-test-envoyextensions
- go-test-troubleshooting
- go-test-api-1-19
- go-test-api-1-20
- go-test-sdk-1-19
- go-test-sdk-1-20
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
if: |
(always() && ! cancelled()) &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
steps:
- run: "go-tests succeeded"