Skip to content

build: use .net 7

build: use .net 7 #149

name: Run Tests and Coverage
on:
push:
pull_request:
branches:
- main
jobs:
test-and-cover:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore workloads
run: dotnet workload restore
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --no-restore --collect:"XPlat Code Coverage" --blame-hang --blame-hang-timeout 60s /property:GenerateFullPaths=true /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByAttribute='ExcludeFromCodeCoverage' /p:SkipAutoProps=true
- name: Coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.cobertura.xml