-
-
Notifications
You must be signed in to change notification settings - Fork 101
54 lines (41 loc) · 1.53 KB
/
dotnetcore.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
name: Build & Test
on: push
env:
# Disable .NET Core welcome and telemetry messages
DOTNET_NOLOGO: true
# Disable .NET Core SDK telemetry
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build-and-test:
name: GitHub Build&Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Print info
run: |
echo User $GITHUB_ACTOR triggered build on $GITHUB_REF by $GITHUB_SHA commit.
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201
- name: Build sln
run: dotnet build -c Release --no-cache /clp:NoSummary ./HappyCode.NetCoreBoilerplate.sln
- name: Test sln
run: dotnet test -c Release --no-build --filter FullyQualifiedName!~LoadTests /maxcpucount:1 /p:WarningLevel=0 ./HappyCode.NetCoreBoilerplate.sln
collect-code-coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201
- name: Collect code coverage
run: dotnet test -c Release --filter FullyQualifiedName!~LoadTests /maxcpucount:1 /p:WarningLevel=0 /p:CollectCoverage=true /p:CoverletOutput="../" /p:MergeWith="../coverage.json" /p:CoverletOutputFormat=\"json,opencover\" ./HappyCode.NetCoreBoilerplate.sln
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./test/coverage.opencover.xml
flags: unittests