Skip to content

Update tests.yml

Update tests.yml #182

Workflow file for this run

name: Coverage
on:
push:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '.github/workflows/**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore ".\src"
- name: Build
run: dotnet build ".\src" --no-restore
- name: Test
run: dotnet test ".\src" --no-build --verbosity normal --collect:"XPlat Code Coverage"
- name: Codecov
uses: codecov/codecov-action@v2