From 6a21759e29ed0cc3ae428c0785fdab8c61dc5b41 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Wed, 26 Jun 2024 13:40:00 -0700 Subject: [PATCH] [WIP] Fail one test on purpuse. --- .github/workflows/build.yml | 7 +++---- .pipelines/templates/build-nuget.yaml | 2 +- MSStore.CLI.UnitTests/PublishCommandUnitTests.cs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) 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 diff --git a/MSStore.CLI.UnitTests/PublishCommandUnitTests.cs b/MSStore.CLI.UnitTests/PublishCommandUnitTests.cs index 1a5cd76..b498b65 100644 --- a/MSStore.CLI.UnitTests/PublishCommandUnitTests.cs +++ b/MSStore.CLI.UnitTests/PublishCommandUnitTests.cs @@ -155,7 +155,7 @@ await FlutterProjectConfigurator.UpdateManifestAsync( var result = await ParseAndInvokeAsync( new string[] { - "publish", + "publish_failOnPurpose", path, "--verbose" });