Skip to content

Commit dea3219

Browse files
committed
Add test reports to GitHub actions
1 parent 3ed0c0e commit dea3219

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ jobs:
2828
- name: Build and Test
2929
run: ./Build.ps1
3030
shell: pwsh
31+
- name: Test Report
32+
uses: dorny/test-reporter@v2
33+
if: always()
34+
with:
35+
name: Test Report
36+
path: artifacts/*.trx
37+
reporter: dotnet-trx
3138
- name: Push to MyGet
3239
env:
3340
NUGET_URL: https://www.myget.org/F/respawn-ci/api/v3/index.json

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ exec { & dotnet clean --configuration Release }
3030

3131
exec { & dotnet build --configuration Release }
3232

33-
exec { & dotnet test --configuration Release --results-directory $artifacts --no-build --logger trx --verbosity=normal }
33+
exec { & dotnet test --configuration Release --no-build --verbosity=normal }
3434

3535
exec { & dotnet pack .\Respawn\Respawn.csproj --configuration Release --output $artifacts --no-build }

Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<PropertyGroup>
3+
<VSTestResultsDirectory>$([System.IO.Path]::Combine('..','artifacts'))</VSTestResultsDirectory>
4+
<VSTestLogger>trx%3BLogFileName=$(MSBuildProjectName)-$(TargetFramework).trx</VSTestLogger>
5+
</PropertyGroup>
6+
</Project>

Respawn.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
Build.ps1 = Build.ps1
1414
.github\workflows\ci.yml = .github\workflows\ci.yml
1515
Directory.Build.props = Directory.Build.props
16+
Directory.Build.targets = Directory.Build.targets
1617
informix-server\my_post.sh = informix-server\my_post.sh
1718
informix-server\onconfig = informix-server\onconfig
1819
Push.ps1 = Push.ps1

0 commit comments

Comments
 (0)