You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by ga...@apache.org on 2022/06/25 03:11:03 UTC
[incubator-shenyu-client-dotnet] branch main updated: code coverage (#21)
This is an automated email from the ASF dual-hosted git repository.
gaohan 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 925076c code coverage (#21)
925076c is described below
commit 925076cd161fc3c494301ad1b4c7a23667f22391
Author: dengliming <li...@gmail.com>
AuthorDate: Sat Jun 25 11:11:00 2022 +0800
code coverage (#21)
* code coverage
* code coverage
* code coverage
* code coverage
* code coverage
---
.github/workflows/code-coverage.yml | 11 ++++++++---
README.md | 9 ++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index 6314d5e..944ea1b 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -34,8 +34,13 @@ 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: Unit Test with dotnet
if: env.SKIP_CI != 'true'
- run: dotnet test --configuration Release
- # - uses: codecov/codecov-action@v1
- # if: env.SKIP_CI != 'true'
+ run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
+ - name: Codecov
+ if: env.SKIP_CI != 'true'
+ uses: codecov/codecov-action@v3
diff --git a/README.md b/README.md
index 0ec0d81..f6af550 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# Shenyu .NET client
+[![build](https://github.com/apache/incubator-shenyu-client-dotnet/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/apache/incubator-shenyu-client-dotnet/actions)
+[![codecov.io](https://codecov.io/gh/apache/incubator-shenyu-client-dotnet/coverage.svg?branch=main)](https://app.codecov.io/gh/apache/incubator-shenyu-client-dotnet?branch=main)
+
## Getting Started
### ASP.NET Core project
@@ -51,11 +54,11 @@ public void ConfigureServices(IServiceCollection services)
When running on your local machine, ASP.NET Core service can only be called from `localhost`. To enable calling by IP, you can replace `https://localhost:{port};http://localhost:{port}` with `https://*:{port};http://*:{port}` by one of the following ways.
- Setting in `launchSettings.json`. Replace for `applicationUrl` field.
-- Setting by environment variables `ASPNETCORE_URLS`. e.g. `ASPNETCORE_URLS "http://*:5000"`
+- Setting by environment variables `ASPNETCORE_URLS`. e.g. `ASPNETCORE_URLS "http://*:5000"`
- Adding `--urls` when start. e.g. `dotnet run --urls "https://*:5001;http://*:5000"`
-- Setting progratically by `UseUrls()` in `Program.cs`.
+- Setting progratically by `UseUrls()` in `Program.cs`.
-e.g.
+e.g.
```csharp
public static IHostBuilder CreateHostBuilder(string[] args) =>