You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2022/06/25 07:11:45 UTC

[incubator-shenyu-client-dotnet] branch main updated: Adding code coverage report in workflow. (#22)

This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-client-dotnet.git


The following commit(s) were added to refs/heads/main by this push:
     new c90c40c  Adding code coverage report in workflow. (#22)
c90c40c is described below

commit c90c40c5c8e394115875304692310fed9baedcf7
Author: Han Gao <dh...@hotmail.com>
AuthorDate: Sat Jun 25 15:11:41 2022 +0800

    Adding code coverage report in workflow. (#22)
    
    * test codecov
    
    * add test coverage
---
 .github/workflows/code-coverage.yml | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index 944ea1b..032c44f 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -34,13 +34,25 @@ jobs:
         uses: actions/setup-dotnet@v2.1.0
         with:
           dotnet-version: 5.0.406
-      - name: Restore dependencies
-        run: dotnet restore
-      - name: Build
-        run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
+
+      # - name: Restore dependencies
+      #   run: dotnet restore
+
+      # - name: Build
+      #   run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
+
+      # - name: Unit Test with dotnet
+      #   if: env.SKIP_CI != 'true'
+      #   run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
+
       - name: Unit Test with dotnet
-        if: env.SKIP_CI != 'true'
-        run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
+        run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release
+
+      - name: Install report tool
+        run: dotnet tool install -g dotnet-reportgenerator-globaltool
+
+      - name: Merging test results
+        run: reportgenerator -reports:TestResults/**/*.xml -targetdir:TestResults -reporttypes:Cobertura
+
       - name: Codecov
-        if: env.SKIP_CI != 'true'
         uses: codecov/codecov-action@v3