-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (32 loc) · 1.02 KB
/
buildpipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: build and test dotnet
on:
push:
pull_request:
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
env:
DOTNET_VERSION: '6.0' # The .NET SDK version to use
jobs:
build:
name: build-and-test
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --logger "trx;LogFileName=test-results.trx" --collect "Code Coverage"
- name: Create Test Report
uses: dorny/test-reporter@v1
with:
name: Unit Tests # Name of the check run which will be created
path: '**/*.trx' # Path to test results (inside artifact .zip)
reporter: dotnet-trx # Format of test results