From efd63f5fde36319eb0479cb4c4035bcfa2517ce9 Mon Sep 17 00:00:00 2001 From: msm1984 Date: Wed, 21 Aug 2024 12:55:59 +0330 Subject: [PATCH 1/3] fix: test new ci --- .github/workflows/CI_Backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_Backend.yml b/.github/workflows/CI_Backend.yml index f2c7990..3764c95 100644 --- a/.github/workflows/CI_Backend.yml +++ b/.github/workflows/CI_Backend.yml @@ -25,4 +25,4 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Run tests - run: dotnet test --no-build --verbosity normal + run: dotnet test --configuration Release --no-build --verbosity normal From a63fb8f365461f9114160db635d5e28cc9aed902 Mon Sep 17 00:00:00 2001 From: msm1984 Date: Wed, 21 Aug 2024 13:18:35 +0330 Subject: [PATCH 2/3] feat: tests result can see now --- .github/workflows/CI_Backend.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI_Backend.yml b/.github/workflows/CI_Backend.yml index 3764c95..74dd012 100644 --- a/.github/workflows/CI_Backend.yml +++ b/.github/workflows/CI_Backend.yml @@ -4,6 +4,9 @@ on: pull_request: branches: - dev + push: + branches: + - main jobs: build-and-test: @@ -25,4 +28,11 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Run tests - run: dotnet test --configuration Release --no-build --verbosity normal + run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test_results.xml" --results-directory "./TestResults" + + - name: Upload test results + uses: actions/upload-artifact@v4 + with: + name: test-results + path: ./TestResults + if: ${{ always() }} From 394c6f528140636a817d21c664294c3ba70027e7 Mon Sep 17 00:00:00 2001 From: msm1984 Date: Wed, 21 Aug 2024 13:30:17 +0330 Subject: [PATCH 3/3] feat: tests result can see now --- .github/workflows/CI_Backend.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI_Backend.yml b/.github/workflows/CI_Backend.yml index 74dd012..507e9e8 100644 --- a/.github/workflows/CI_Backend.yml +++ b/.github/workflows/CI_Backend.yml @@ -28,11 +28,13 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Run tests - run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test_results.xml" --results-directory "./TestResults" + run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" || true - - name: Upload test results - uses: actions/upload-artifact@v4 + - name: Test Report + uses: dorny/test-reporter@v1 + if: always() with: - name: test-results - path: ./TestResults - if: ${{ always() }} + name: DotNET Tests + path: "**/test-results.trx" + reporter: dotnet-trx + fail-on-error: true