Skip to content

Commit

Permalink
.NET test results (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus authored Feb 24, 2022
1 parent b21e5eb commit 1b26e06
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ jobs:

- name: Run Bake
run: bake-it/bake run --build-version 0.11.$GITHUB_RUN_NUMBER

- name: Upload test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ jobs:

- name: Run Bake
run: bake-it/bake run --convention=Release --build-version 0.11.$GITHUB_RUN_NUMBER --destination="nuget>github,nuget,release>github"

- name: Upload test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error
19 changes: 19 additions & 0 deletions .github/workflows/test-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: test-report
on:
workflow_run:
workflows:
- 'pull-requests'
- 'release'
types:
- completed

jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Test results
path: '**/*.trx'
reporter: dotnet-trx
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 0.11-beta

* New: Use content of `README.md` files as DLL and NuGet descriptions
* New: .NET test reports are now saved as `.trx` files allow artifact uploads
to pick these up after build completion
* Fixed: Bake is now better at picking release notes with versions that
are *similar* to the build version if no exact match can be found. As
an example `1.0-alpha` is picked among `1.1`, `1.0-alpha` and `0.9`
Expand Down
1 change: 1 addition & 0 deletions Source/Bake/Services/Tools/DotNet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public async Task<IToolResult> TestAsync(
argument.FilePath,
"--nologo",
"--configuration", argument.Configuration,
"--logger", "\"trx;LogFileName=test-results.trx\""
};

AddIf(!argument.Restore, arguments, "--no-restore");
Expand Down

0 comments on commit 1b26e06

Please sign in to comment.