From 5f7af7390bfe2dd884cd6f1d13eea346e8b4bb29 Mon Sep 17 00:00:00 2001 From: Defkon1 Date: Wed, 14 Jan 2026 12:55:31 +0100 Subject: [PATCH 1/4] Splitted actual CI action in two separate actions (test and report) - Fix #70 --- .github/workflows/bitblazor-testreporter.yml | 25 +++++++++++++++++ .github/workflows/bitblazor-testrunner.yml | 29 ++++++++++++-------- 2 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/bitblazor-testreporter.yml diff --git a/.github/workflows/bitblazor-testreporter.yml b/.github/workflows/bitblazor-testreporter.yml new file mode 100644 index 0000000..7c88730 --- /dev/null +++ b/.github/workflows/bitblazor-testreporter.yml @@ -0,0 +1,25 @@ +name: 'BitBlazor - Test reporter' + +on: + workflow_run: + workflows: ['BitBlazor - Test runner'] + types: + - completed + +permissions: + contents: read + actions: read + checks: write + +jobs: + report: + runs-on: ubuntu-latest + + steps: + - name: Test Report + uses: dorny/test-reporter@v2 + with: + artifact: dotnet-test-results # artifact name + name: DotNET Tests # Name of the check run which will be created + path: '*.trx' # Path to test results (inside artifact .zip) + reporter: dotnet-trx # Format of test results \ No newline at end of file diff --git a/.github/workflows/bitblazor-testrunner.yml b/.github/workflows/bitblazor-testrunner.yml index 38c1f2d..da2b4f8 100644 --- a/.github/workflows/bitblazor-testrunner.yml +++ b/.github/workflows/bitblazor-testrunner.yml @@ -1,4 +1,4 @@ -name: BitBlazor - Test runner +name: 'BitBlazor - Test runner' on: push: @@ -9,8 +9,8 @@ on: - main workflow_dispatch: -permissions: - checks: write +#permissions: +# checks: write jobs: build_and_test: @@ -40,12 +40,19 @@ jobs: - name: Test run: dotnet test $SOLUTION --configuration $BUILD_CONFIG --logger "trx;LogFileName=test-runner-results.trx" || true - - - name: Test Report - uses: dorny/test-reporter@v1 - if: always() + + # DEPRECATED - see #70 + #- name: Test Report + # uses: dorny/test-reporter@v1 + # if: always() + # with: + # name: DotNET Tests + # path: "**/test-runner-results.trx" + # reporter: dotnet-trx + # fail-on-error: true + + - uses: actions/upload-artifact@v4 # upload test results + if: ${{ !cancelled() }} # run this step even if previous step failed with: - name: DotNET Tests - path: "**/test-runner-results.trx" - reporter: dotnet-trx - fail-on-error: true + name: dotnet-test-results + path: test-runner-results.trx \ No newline at end of file From c4ad12afe139b5becbd6f185c002d07894190030 Mon Sep 17 00:00:00 2001 From: Defkon1 Date: Wed, 21 Jan 2026 12:09:48 +0100 Subject: [PATCH 2/4] Fixed path in action --- .github/workflows/bitblazor-testrunner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bitblazor-testrunner.yml b/.github/workflows/bitblazor-testrunner.yml index bb1c663..7214aaf 100644 --- a/.github/workflows/bitblazor-testrunner.yml +++ b/.github/workflows/bitblazor-testrunner.yml @@ -55,4 +55,4 @@ jobs: if: ${{ !cancelled() }} # run this step even if previous step failed with: name: dotnet-test-results - path: test-runner-results.trx \ No newline at end of file + path: "**/test-runner-results.trx" \ No newline at end of file From bc77fbe65c7a0e214a7502bade5b08a9eaffcbb8 Mon Sep 17 00:00:00 2001 From: Defkon1 Date: Wed, 21 Jan 2026 12:13:51 +0100 Subject: [PATCH 3/4] Fixed path in test reporter action --- .github/workflows/bitblazor-testreporter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bitblazor-testreporter.yml b/.github/workflows/bitblazor-testreporter.yml index 7c88730..8258757 100644 --- a/.github/workflows/bitblazor-testreporter.yml +++ b/.github/workflows/bitblazor-testreporter.yml @@ -21,5 +21,5 @@ jobs: with: artifact: dotnet-test-results # artifact name name: DotNET Tests # Name of the check run which will be created - path: '*.trx' # Path to test results (inside artifact .zip) + path: '**/*.trx' # Path to test results (inside artifact .zip) reporter: dotnet-trx # Format of test results \ No newline at end of file From 05686ba4c88370e269cabbbfedf56a461e30dc9b Mon Sep 17 00:00:00 2001 From: Defkon1 Date: Wed, 28 Jan 2026 11:08:01 +0100 Subject: [PATCH 4/4] Added review suggestions (worfklow circuit breaker in bitblazor-testreporter.yml, step name and retention days for upload step in bitblazor-testrunner.yml) --- .github/workflows/bitblazor-testreporter.yml | 1 + .github/workflows/bitblazor-testrunner.yml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bitblazor-testreporter.yml b/.github/workflows/bitblazor-testreporter.yml index 8258757..63dc64a 100644 --- a/.github/workflows/bitblazor-testreporter.yml +++ b/.github/workflows/bitblazor-testreporter.yml @@ -14,6 +14,7 @@ permissions: jobs: report: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Test Report diff --git a/.github/workflows/bitblazor-testrunner.yml b/.github/workflows/bitblazor-testrunner.yml index 7214aaf..e14f2ba 100644 --- a/.github/workflows/bitblazor-testrunner.yml +++ b/.github/workflows/bitblazor-testrunner.yml @@ -51,8 +51,10 @@ jobs: # reporter: dotnet-trx # fail-on-error: true - - uses: actions/upload-artifact@v4 # upload test results + - name: Upload test results + uses: actions/upload-artifact@v4 # upload test results if: ${{ !cancelled() }} # run this step even if previous step failed with: name: dotnet-test-results - path: "**/test-runner-results.trx" \ No newline at end of file + path: "**/test-runner-results.trx" + retention-days: 7 \ No newline at end of file