diff --git a/.github/workflows/ci-azure.yml b/.github/workflows/ci-azure.yml index 80c7a71..9bb9ba3 100644 --- a/.github/workflows/ci-azure.yml +++ b/.github/workflows/ci-azure.yml @@ -12,6 +12,8 @@ env: permissions: contents: read + actions: read + checks: write packages: write jobs: @@ -44,7 +46,16 @@ jobs: run: dotnet build ${{ env.solutionFolder }} --no-restore --configuration ${{ env.buildConfiguration }} /p:ContinuousIntegrationBuild=true /p:BuildNumber=${{ env.BUILD_NUMBER }} - name: Test - run: dotnet test ${{ env.solutionFolder }} --no-restore --no-build --configuration ${{ env.buildConfiguration }} + run: dotnet test ${{ env.solutionFolder }} --no-restore --no-build --configuration ${{ env.buildConfiguration }} --logger "trx;LogFileName=test_results.trx" --results-directory "TestResults" + + - name: Publish Test Results + uses: dorny/test-reporter@v1 + if: always() + with: + name: Test Results + path: 'TestResults/**/*.trx' + reporter: dotnet-trx + fail-on-error: true - name: Pack run: dotnet pack ${{ env.solutionFolder }} --no-restore --no-build --configuration ${{ env.buildConfiguration }} --output ${{ github.workspace }}/artifacts /p:ContinuousIntegrationBuild=true /p:BuildNumber=${{ env.BUILD_NUMBER }} @@ -52,5 +63,5 @@ jobs: - name: Publish packages uses: actions/upload-artifact@v4 with: - name: nuget + name: NuGet Packages path: ${{ github.workspace }}/artifacts/*.nupkg