From 9b910b24eab38efa405c06f1c9b4529be48e3e5f Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 26 Oct 2023 17:34:15 +0300 Subject: [PATCH] build: update CI script to upload test result Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 957b1e92f..9f385c0fe 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -24,7 +24,7 @@ on: jobs: build: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v3 @@ -49,6 +49,9 @@ jobs: java-version: ${{ env.JAVA_VERSION }} distribution: "adopt" + - name: Runner + run: echo ${{ runner.os }} + - name: Build for JS, Android, JVM run: | ./gradlew build test koverXmlReport koverHtmlReport @@ -62,16 +65,28 @@ jobs: update-comment: true - name: Publish test results - if: always() + if: runner.os == 'Linux' + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "${{ github.workspace }}/atala-prism-sdk/build/test-results/testReleaseUnitTest/TEST-*.xml" + comment_title: "Unit Test Results" + check_name: "Unit Test Results" + + - name: Publish test results + if: runner.os == 'macOS' uses: EnricoMi/publish-unit-test-result-action/composite@v2 with: files: "${{ github.workspace }}/atala-prism-sdk/build/test-results/testReleaseUnitTest/TEST-*.xml" comment_title: "Unit Test Results" check_name: "Unit Test Results" - - name: Publish coverage report + - name: Upload Tests Reports uses: actions/upload-artifact@v3 with: name: kover-html - path: atala-prism-sdk/build/kover/atala-prism-sdk/xml + path: | + atala-prism-sdk/build/kover/atala-prism-sdk/xml + atala-prism-sdk/build/reports/tests/**/*.html + atala-prism-sdk/build/reports/tests/jvmTest/index.html + if-no-files-found: error