Skip to content

Commit

Permalink
Add test status job to CI workflow to aggregate jobs results
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigozhou committed Nov 19, 2024
1 parent e3ae3be commit 9dc6572
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest, ubuntu-arm]
os: [ubuntu-latest, macos-latest, macos-13, windows-latest, ubuntu-arm]
include:
- os: ubuntu-latest
checkGenCodeTarget: true
Expand All @@ -20,14 +20,14 @@ jobs:
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version-file: 'go.mod'

- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
Expand Down Expand Up @@ -67,3 +67,18 @@ jobs:
printf '%s\n' "$TEMPORAL_TLS_CERT_CONTENT" >> client.crt
printf '%s\n' "$TEMPORAL_TLS_KEY_CONTENT" >> client.key
go run ./cmd/temporal workflow list --limit 2
test-status:
if: always()
name: Test Status
needs:
- build-test
runs-on: ubuntu-latest
env:
RESULTS: ${{ toJSON(needs.*.result) }}
steps:
- name: Check results
run: |
if [[ -n $(echo "$RESULTS" | jq '.[] | select (. != "success")') ]]; then
exit 1
fi

0 comments on commit 9dc6572

Please sign in to comment.