Skip to content

Commit 962df2a

Browse files
authored
Fix for reading test results
1 parent b20861d commit 962df2a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,23 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Download Test Result Artifact
13+
- name: Download All Test Results
1414
uses: actions/download-artifact@v4
1515
with:
16-
name: TESTS_PASSED
17-
path: . # Current directory
16+
path: test-results # Store all test result files here
1817

19-
- name: Read Test Result
20-
id: read_test_result
21-
run: echo "TESTS_PASSED=$(cat test_result.txt)" >> $GITHUB_ENV
18+
- name: Aggregate Test Results
19+
id: aggregate_tests
20+
run: |
21+
FAILED_TESTS=0
22+
for file in test-results/*; do
23+
TEST_STATUS=$(cat "$file")
24+
if [[ "$TEST_STATUS" == "failure" ]]; then
25+
FAILED_TESTS=$((FAILED_TESTS + 1))
26+
fi
27+
done
28+
29+
echo "TOTAL_FAILED_TESTS=$FAILED_TESTS" >> $GITHUB_ENV
2230
2331
- name: Read Commit Message
2432
id: commit_msg

0 commit comments

Comments
 (0)