chore: add gen and test-go-race to required check (#7952)

This commit is contained in:
Dean Sheather
2023-06-10 04:07:17 +00:00
committed by GitHub
parent 1ec463d74d
commit ec7b117878
+20 -7
View File
@@ -565,12 +565,25 @@ jobs:
required:
runs-on: ubuntu-latest
needs: [test-go, test-go-pg, test-js]
# allow this job to run even if the previous jobs are skipped
if: |
always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
needs: [gen, test-go, test-go-pg, test-go-race, test-js]
# Allow this job to run even if the needed jobs fail, are skipped or
# cancelled.
if: always()
steps:
- name: Ensure required checks
run: echo "Required checks have passed"
run: |
echo "Checking required checks"
echo "- gen: ${{ needs.gen.result }}"
echo "- test-go: ${{ needs.test-go.result }}"
echo "- test-go-pg: ${{ needs.test-go-pg.result }}"
echo "- test-go-race: ${{ needs.test-go-race.result }}"
echo "- test-js: ${{ needs.test-js.result }}"
echo
# We allow skipped jobs to pass, but not failed or cancelled jobs.
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One of the required checks has failed or has been cancelled"
exit 1
fi
echo "Required checks have passed"