Hopefully adding code coverage #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build And Test | |
on: [push] | |
env: | |
BuildVersion: '8.0.${{github.run_number}}' | |
SolutionFile: 'src/EcsR3.sln' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET 9.0 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 9.0.x | |
- name: Build | |
run: dotnet restore ${{ env.SolutionFile }} | |
- name: Build | |
run: dotnet build --configuration Release -p:Version=${{ env.BuildVersion }} ${{ env.SolutionFile }} | |
- name: Test | |
run: dotnet test --configuration Release --no-build ${{ env.SolutionFile }} --logger trx --collect:"XPlat Code Coverage" | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Unit Tests | |
path: "**/*.trx" | |
reporter: dotnet-trx | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: '**/coverage.cobertura.xml' | |
badge: true | |
format: 'markdown' | |
output: 'both' | |
- name: Write to Job Summary | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY |