mirror of
https://github.com/coder/coder.git
synced 2026-09-22 21:22:17 +08:00
chore: add gen and test-go-race to required check (#7952)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user