From 5cbc0cfc474f623b6903e43d15ccd5f086d6a16d Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Sun, 1 Dec 2024 18:38:00 +0100 Subject: [PATCH] Display the unit test results --- .github/jobs/unit-tests.sh | 2 +- .github/workflows/unit-tests.yml | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/jobs/unit-tests.sh b/.github/jobs/unit-tests.sh index f0fd0111f9..111f9515b2 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 58b6022a08..d80d0c12ef 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,14 +46,15 @@ jobs: run: diff newcodecov .github/jobs/uploadcodecov.sh - name: Run the unit tests run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }} - #- name: Publish Test Results - # uses: EnricoMi/publish-unit-test-result-action@v2 - # if: always() - # with: - # files: | - # test-results/**/*.xml - 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