File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 9696 name : ${{ github.sha }}-${{ matrix.build-target }}-build
9797 path : ${{ matrix.build-target }}-build.tar.gz
9898 retention-days : 90
99+ smoke-tests :
100+ name : Trigger Smoke Tests
101+ runs-on : ubuntu-latest
102+ needs : build
103+ if : success()
104+ permissions :
105+ actions : write
106+ steps :
107+ - name : Trigger SageMaker smoke tests
108+ env :
109+ GH_TOKEN : ${{ github.token }}
110+ run : |
111+ gh workflow run smoke-tests-sagemaker.yaml \
112+ --repo ${{ github.repository }} \
113+ --ref ${{ github.ref }}
114+
99115 handle-failures :
100116 name : Handle Failures
101117 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 3737 fi
3838 echo "Tag is from a valid branch."
3939
40+ - name : Verify smoke tests passed
41+ run : |
42+ echo "Checking smoke test results for commit $COMMIT_SHA..."
43+
44+ # Find smoke test runs for this commit
45+ RUN_INFO=$(gh run list --workflow=smoke-tests-sagemaker.yaml --json headSha,conclusion,status --limit 50 | \
46+ jq -r --arg sha "$COMMIT_SHA" '.[] | select(.headSha == $sha) | "\(.status) \(.conclusion)"' | head -1)
47+
48+ if [ -z "$RUN_INFO" ]; then
49+ echo "Error: No smoke test run found for commit $COMMIT_SHA"
50+ exit 1
51+ fi
52+
53+ STATUS=$(echo "$RUN_INFO" | cut -d' ' -f1)
54+ CONCLUSION=$(echo "$RUN_INFO" | cut -d' ' -f2)
55+
56+ if [ "$STATUS" != "completed" ]; then
57+ echo "Error: Smoke tests not completed (status: $STATUS)"
58+ exit 1
59+ fi
60+
61+ if [ "$CONCLUSION" != "success" ]; then
62+ echo "Error: Smoke tests failed (conclusion: $CONCLUSION)"
63+ exit 1
64+ fi
65+
66+ echo "Smoke tests passed for commit $COMMIT_SHA"
67+
4068 - name : Download sagemaker artifacts by commit ID
4169 run : |
4270 gh run download --name "$COMMIT_SHA-code-editor-sagemaker-server-build" --name "$COMMIT_SHA-code-editor-sagemaker-server-src"
You can’t perform that action at this time.
0 commit comments