opentelemetry-dotnet/.github/workflows/dotnet-core-cov.yml

48 lines
1.2 KiB
YAML

name: .NET Code Coverage
on:
push:
branches: [ master1 ]
pull_request:
branches: [ master1 ]
jobs:
build-test-report:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
env:
OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: dotnet build
run: dotnet build --configuration Release --no-restore
- name: dotnet test
run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
- name: Install report tool
run: dotnet tool install -g dotnet-reportgenerator-globaltool
- name: Merging test results
run: reportgenerator -reports:TestResults/**/*.xml -targetdir:TestResults -reporttypes:Cobertura
- uses: codecov/codecov-action@v1.0.10
with:
file: TestResults/Cobertura.xml
env_vars: OS
name: Code Coverage for ${{ matrix.os }}