Skip to content

Commit 17a9364

Browse files
committed
ci: add tests results as artifact file
1 parent ba2c7f7 commit 17a9364

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,22 @@ jobs:
3434
needs: build
3535
runs-on: self-hosted
3636
timeout-minutes: 2
37+
env:
38+
test-result-file: test_result.txt
3739

3840
steps:
3941
- name: Run tests
4042
run: |
41-
python3 ./run_tests.py --build-dir=${{ env.build_dir }} | tee >(grep -qE "FAILED|ERROR" && echo "HAS_ERRORS=true" >> $GITHUB_ENV)
42-
if [[ $HAS_ERRORS == "true" ]]; then
43+
python3 ./run_tests.py --build-dir=${{ env.build_dir }} | tee ${{ env.test-result-file }}
44+
45+
- name: Upload tests results
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: ${{ env.test-result-file }}
49+
path: ${{ env.test-result-file }}
50+
51+
- name: Check for tests results
52+
run: |
53+
if cat ${{ env.test-result-file }} | grep -q "FAILED"; then
4354
exit 1
4455
fi

0 commit comments

Comments
 (0)