Skip to content

Commit

Permalink
Merge pull request #45 from purview-dev/test-results-upload
Browse files Browse the repository at this point in the history
Test results upload
  • Loading branch information
kieronlanning authored Jun 12, 2024
2 parents 289354c + a92334c commit 5a8e260
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,23 @@ jobs:
uses: actions/setup-dotnet@v4
with:
global-json-file: ./src/global.json

- name: Run tests
run: dotnet test ${{ env.SolutionPath }} --configuration ${{ env.BuildConfigutation }}
run: dotnet test ${{ env.SolutionPath }} --configuration ${{ env.BuildConfigutation }} --logger "trx;LogFileName=test-results.trx" --results-directory ./test-results

- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: .NET Tests
path: ./src/test-results/*.trx
reporter: dotnet-trx

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./src/test-results

deploy:
if: github.event_name == 'release'
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<MSCodeAnalysisCSharpVersion>4.9.2</MSCodeAnalysisCSharpVersion>
<MSCodeAnalysisCSharpVersion>4.10.0</MSCodeAnalysisCSharpVersion>
</PropertyGroup>
<ItemGroup Label="NuGet Package References" Condition="$(IsTestProject) == 'false'">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
Expand All @@ -25,6 +25,6 @@
<PackageVersion Include="xunit.analyzers" Version="1.14.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
<PackageVersion Include="Verify.Xunit" Version="25.0.1" />
<PackageVersion Include="Verify.Xunit" Version="25.0.2" />
</ItemGroup>
</Project>

0 comments on commit 5a8e260

Please sign in to comment.