Skip to content

Commit

Permalink
build(azure): publish unit test results
Browse files Browse the repository at this point in the history
  • Loading branch information
jayharris committed Apr 3, 2024
1 parent 9a477f8 commit 639fef5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:

permissions:
contents: read
actions: read
checks: write
packages: write

jobs:
Expand Down Expand Up @@ -44,13 +46,22 @@ 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 }}

- name: Publish packages
uses: actions/upload-artifact@v4
with:
name: nuget
name: NuGet Packages
path: ${{ github.workspace }}/artifacts/*.nupkg

0 comments on commit 639fef5

Please sign in to comment.