diff --git a/.github/jobs/unit-tests.sh b/.github/jobs/unit-tests.sh index 7044d37297..8dc485bc41 100755 --- a/.github/jobs/unit-tests.sh +++ b/.github/jobs/unit-tests.sh @@ -35,7 +35,7 @@ if [ "$CODECOVERAGE" -eq 1 ]; then pcov="--coverage-html=${DIR}/coverage-html --coverage-clover coverage.xml" fi set +e -php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR}/unit-tests.xml --colors=never $pcov > "$ARTIFACTS"/phpunit.out +php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit "$ARTIFACTS"/unit-tests.xml --colors=never $pcov > "$ARTIFACTS"/phpunit.out UNITSUCCESS=$? set -e CNT=0 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c942c983b7..93792dd12e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -48,6 +48,13 @@ jobs: run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }} - name: Upload artifact for debugging uses: actions/upload-artifact@v3 + if: ${{ !cancelled() }} with: name: unit-test-output path: /tmp/artifacts + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: ${{ !cancelled() }} + with: + files: | + /tmp/artifacts/unit-tests.xml