27
27
with :
28
28
dotnet-version : 3.1.x
29
29
30
- - name : Use Node.js
31
- uses : actions/setup-node@v1
32
- with :
33
- node-version : ' 12.x'
34
-
35
30
- name : NBGV
36
31
id : nbgv
37
32
uses : dotnet/nbgv@master
@@ -49,24 +44,25 @@ jobs:
49
44
run : msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
50
45
working-directory : src
51
46
52
- - name : Install Report Generator
53
- run : dotnet tool install --global dotnet-reportgenerator-globaltool
54
-
55
- - name : Run Unit Tests
56
- run : dotnet test -- no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput="../../artifacts/coverage/coverage.xml" /p:Include="[${{ env.productNamespacePrefix}}*]*" /p:Exclude="[${{ env.productNamespacePrefix}}*Tests.*]*"
57
- working-directory : src
58
-
59
- - name : Generate Coverage Report
60
- run : reportgenerator -reports:"coverage.*.xml" -targetdir:report-output
61
- working-directory : artifacts/coverage
47
+ - name : Run Unit Tests and Generate Coverage
48
+ uses : glennawatson/coverlet-msbuild@v1
49
+ with :
50
+ project-files : ' **/* Tests*.csproj '
51
+ no-build : true
52
+ exclude-filter : ' [${{env.productNamespacePrefix}}.*.Tests.*]* '
53
+ include-filter : ' [${{env.productNamespacePrefix}}*]* '
54
+ output-format : cobertura
55
+ output : ' ../../artifacts/ '
56
+ configuration : ${{ env.configuration }}
62
57
63
58
- name : Upload Code Coverage
59
+ shell : bash
64
60
run : |
65
- npm install -g codecov
66
- codecov
67
- working-directory : artifacts/coverage
61
+ echo $PWD
62
+ bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ env.CODECOV_TOKEN }} -s '$PWD/artifacts' -f '*.xml'
68
63
env :
69
64
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
65
+
70
66
- name : Create NuGet Artifacts
71
67
uses : actions/upload-artifact@master
72
68
with :
0 commit comments