diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b56638..4293cda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,17 +55,16 @@ jobs: CoverletOutputFormat: cobertura run: dotnet test MSStore.CLI.sln --no-restore /p:Configuration=Release --logger trx & wait - name: Publish test results - if: ${{ !env.ACT }} && (success() || failure()) + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: test-results-${{ matrix.os }} path: MSStore.CLI.UnitTests/TestResults/*.trx - name: Install ReportGenerator - run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.2.2 + run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.6 - name: Merge code coverage files run: reportgenerator "-reports:${{ github.workspace }}/**/*coverage.*.cobertura.xml" "-targetdir:${{ github.workspace }}/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs" - name: Publish code coverage results - if: ${{ !env.ACT }} uses: actions/upload-artifact@v4 with: name: Cobertura-${{ matrix.os }} @@ -75,7 +74,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: dotnet pack MSStore.API --no-build -c Release - name: Upload Artifact - NuGet - if: ${{ matrix.os == 'ubuntu-latest' && !env.ACT }} + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/upload-artifact@v4 with: name: NuGet diff --git a/.pipelines/templates/build-nuget.yaml b/.pipelines/templates/build-nuget.yaml index 5f5de20..49dff5b 100644 --- a/.pipelines/templates/build-nuget.yaml +++ b/.pipelines/templates/build-nuget.yaml @@ -56,7 +56,7 @@ steps: inputs: command: custom custom: tool - arguments: 'install --global dotnet-reportgenerator-globaltool --version 5.2.2' + arguments: 'install --global dotnet-reportgenerator-globaltool --version 5.3.6' - script: reportgenerator "-reports:$(Build.SourcesDirectory)/**/*coverage.*.cobertura.xml" "-targetdir:$(Build.SourcesDirectory)/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs" displayName: Merge code coverage files - task: PublishCodeCoverageResults@1