Skip to content

Commit 84695ae

Browse files
committed
#1: add junit report to ci
1 parent f7b5d00 commit 84695ae

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
name: Run ${{ matrix.runner.name }}
3737
runs-on: ${{ matrix.runner.runs-on }}
3838
needs: get-matrix
39+
env:
40+
JUNIT_REPORT: ~
3941
strategy:
4042
fail-fast: false
4143
matrix:
@@ -134,6 +136,10 @@ jobs:
134136
exit $(docker container inspect --format '{{.State.ExitCode}}' test-container)
135137
fi
136138
139+
if [ $FOO_TEST_REPORT != "" ]; then
140+
echo "FOO_TEST_REPORT=${FOO_TEST_REPORT}" >> "$GITHUB_OUTPUT"
141+
else
142+
137143
# - name: Build and test
138144
# TODO: Build an test step.
139145
# > Option 1: Docker image (Environment Setup="docker") WIP
@@ -152,3 +158,19 @@ jobs:
152158
# note: (as in vt-tv or LBAF)
153159

154160
# - name: Report coverage
161+
162+
- name: Unit tests
163+
if: ${{ env.JUNIT_REPORT != '' }}
164+
uses: phoenix-actions/test-reporting@v15
165+
with:
166+
name: Tests report
167+
path: ${{ env.JUNIT_REPORT }}
168+
reporter: java-junit
169+
output-to: step-summary
170+
171+
- name: Upload artifacts
172+
uses: actions/upload-artifact@v4
173+
if: always()
174+
with:
175+
name: foo-output-${{ matrix.runner.setup }}
176+
path: /opt/foo/output

0 commit comments

Comments
 (0)