File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 2121 required : false
2222 type : string
2323 default : ' '
24+ test_timeout_seconds :
25+ description : ' Timeout for each integration test in seconds'
26+ required : false
27+ type : number
28+ default : 1800
2429
2530jobs :
2631 build-integration-tests :
@@ -108,7 +113,21 @@ jobs:
108113 chmod +x ./target/debug/${{ matrix.test_binary }}
109114
110115 - name : " Run ${{ matrix.test_binary }}"
111- run : ./target/debug/${{ matrix.test_binary }}
116+ run : |
117+ TIMEOUT_SECONDS=${{ inputs.test_timeout_seconds }}
118+ echo "Running test with ${TIMEOUT_SECONDS} second timeout..."
119+
120+ timeout ${TIMEOUT_SECONDS} ./target/debug/${{ matrix.test_binary }} || EXIT_CODE=$?
121+
122+ if [ "${EXIT_CODE:-0}" -eq 124 ]; then
123+ echo "ERROR: Test '${{ matrix.test_binary }}' timed out after ${TIMEOUT_SECONDS} seconds."
124+ exit 1
125+ elif [ "${EXIT_CODE:-0}" -ne 0 ]; then
126+ echo "ERROR: Test '${{ matrix.test_binary }}' failed with exit code ${EXIT_CODE}."
127+ exit ${EXIT_CODE}
128+ fi
129+
130+ echo "Test completed successfully."
112131 env :
113132 SEED : 0
114133
You can’t perform that action at this time.
0 commit comments