Skip to content

Commit

Permalink
[WIP] Fail one test on purpuse.
Browse files Browse the repository at this point in the history
  • Loading branch information
azchohfi committed Jun 26, 2024
1 parent e4c3631 commit 1a8fee2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,29 @@ 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
if: ${{ !cancelled() }}
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.6
- name: Merge code coverage files
if: ${{ !cancelled() }}
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 }}
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: Cobertura-${{ matrix.os }}
path: ${{ github.workspace }}/report/Cobertura.xml
# TODO: Publish github comment with code coverage
- name: Pack NuGet
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-latest' && steps.build.conclusion == 'success' && !cancelled() }}
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' && steps.build.conclusion == 'success' && !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: NuGet
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/build-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion MSStore.CLI.UnitTests/PublishCommandUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ await FlutterProjectConfigurator.UpdateManifestAsync(
var result = await ParseAndInvokeAsync(
new string[]
{
"publish",
"publish_failOnPurpose",
path,
"--verbose"
});
Expand Down

0 comments on commit 1a8fee2

Please sign in to comment.