Skip to content

Commit 7004eb1

Browse files
Applies the pre-merge CI failure control to the tasks (#3457)
Applied the pre-merge CI failure control to the tasks stage, as it is done in the general test stage Co-authored-by: Kelly Guo <[email protected]>
1 parent ced52cd commit 7004eb1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ jobs:
7676
retention-days: 1
7777
compression-level: 9
7878

79+
- name: Check Test Results for Fork PRs
80+
if: github.event.pull_request.head.repo.full_name != github.repository
81+
run: |
82+
if [ -f "reports/isaaclab-tasks-report.xml" ]; then
83+
# Check if the test results contain any failures
84+
if grep -q 'failures="[1-9]' reports/isaaclab-tasks-report.xml || grep -q 'errors="[1-9]' reports/isaaclab-tasks-report.xml; then
85+
echo "Tests failed for PR from fork. The test report is in the logs. Failing the job."
86+
exit 1
87+
fi
88+
else
89+
echo "No test results file found. This might indicate test execution failed."
90+
exit 1
91+
fi
92+
7993
test-general:
8094
runs-on: [self-hosted, gpu]
8195
timeout-minutes: 180

0 commit comments

Comments
 (0)