-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (54 loc) · 1.57 KB
/
dotnet.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: .NET (CI)
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
sdk: [6.x]
dotnetFramework: [net6.0]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.sdk }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: |
dotnet test -f ${{ matrix.dotnetFramework }} --no-build --verbosity normal \
/p:CollectCoverage=true \
/p:CoverletOutputFormat=opencover \
/p:CoverletOutput=opencovertests.xml \
/p:Exclude=[xunit*]* \
# --% \
# /p:ExcludeByAttribute=\"GeneratedCodeAttribute,CompilerGeneratedAttribute,TestSDKAutoGeneratedCode\"
- name: Upload Coverage Report
uses: actions/[email protected]
with:
name: code-coverage-report
# A file, directory or wildcard pattern that describes what to upload
path: |
**/opencovertests.xml
codeQuality:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Coverage Report
uses: actions/download-artifact@v2
with:
name: code-coverage-report
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_KEY}}
files: |
**/opencovertests.xml