File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,19 @@ jobs:
63
63
run : |
64
64
if [ ${{ github.event_name }} != 'pull_request' ]; then
65
65
# if [ ${{ github.event_name }} == 'schedule' ]; then
66
- last_run_commit=$(jq -r '.commit_sha' ./runtime-test-results/test_results.json)
66
+ if [ -f ./runtime-test-results/test_results.json ]; then
67
+ last_run_commit=$(jq -r '.commit_sha' ./runtime-test-results/test_results.json)
68
+ last_run_failed=$(jq -r '.tests_failed' ./runtime-test-results/test_results.json)
69
+ else
70
+ last_run_commit="none"
71
+ last_run_failed="true"
72
+ fi
67
73
current_commit=${{ github.sha }}
68
- if [ "$last_run_commit" == "$current_commit" ]; then
74
+ if [ "$last_run_commit" == "$current_commit" ] && [ "$last_run_failed" == "false" ] ; then
69
75
echo "Last run commit and current commit are the same. Skipping tests..."
70
76
echo "run_tests=false" >> $GITHUB_OUTPUT
71
77
else
72
- echo "Last run commit and current commit are different. Running tests..."
78
+ echo "Last run commit and current commit are different or last run failed . Running tests..."
73
79
echo "run_tests=true" >> $GITHUB_OUTPUT
74
80
fi
75
81
else
You can’t perform that action at this time.
0 commit comments