From 22b0e79be087df9dc304f4d67df2f3690a3f037f Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 14:41:52 +0300 Subject: [PATCH 1/7] Add Codecov step to build-cake job --- .github/steps/prepare-coveralls.sh | 4 +++- .github/workflows/pr.yml | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/steps/prepare-coveralls.sh b/.github/steps/prepare-coveralls.sh index aba97725e..21eeaf887 100644 --- a/.github/steps/prepare-coveralls.sh +++ b/.github/steps/prepare-coveralls.sh @@ -1,7 +1,9 @@ #!/bin/bash # Prepare Coveralls -echo ------------ Listing environment variables ------------ +echo "::group::Listing environment variables" env | sort +echo "::endgroup::" + echo ------------ Detect coverage file ------------ coverage_1st_folder=$(ls -d /home/runner/work/Ocelot/Ocelot/artifacts/UnitTests/*/ | head -1) echo "Detected first folder : $coverage_1st_folder" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7cfd644d9..9f0ca0dff 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -169,10 +169,21 @@ jobs: uses: cake-build/cake-action@v3 with: target: LatestFramework - - name: Prepare Coveralls + - name: Coverage files run: ./.github/steps/prepare-coveralls.sh - name: Coveralls if: env.COVERALLS_coverage_file_exists == 'true' uses: coverallsapp/github-action@v2 with: + fail-on-error: false file: ${{ env.COVERALLS_coverage_file }} + - name: Codecov + if: env.COVERALLS_coverage_file_exists == 'true' + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ThreeMammals/Ocelot + fail_ci_if_error: true + files: ${{ env.COVERALLS_coverage_file }} + flags: unittests + verbose: true From ae5cf962fd2b430acd576a39dd87be008c366068 Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 15:38:29 +0300 Subject: [PATCH 2/7] Coveralls and Codecov steps must be independent and not cause job failures --- .github/workflows/pr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9f0ca0dff..e0807e82c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -175,8 +175,9 @@ jobs: if: env.COVERALLS_coverage_file_exists == 'true' uses: coverallsapp/github-action@v2 with: - fail-on-error: false + # fail-on-error: false file: ${{ env.COVERALLS_coverage_file }} + continue-on-error: true - name: Codecov if: env.COVERALLS_coverage_file_exists == 'true' uses: codecov/codecov-action@v5 @@ -186,4 +187,4 @@ jobs: fail_ci_if_error: true files: ${{ env.COVERALLS_coverage_file }} flags: unittests - verbose: true + continue-on-error: true From e787eb53e223dc125befc2e1862a33437cda382d Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 16:17:48 +0300 Subject: [PATCH 3/7] Codecov step for build-cake jobs --- .github/workflows/develop.yml | 15 +++++++++++++-- .github/workflows/release.yml | 15 ++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 9c34e933e..bc9ce91e6 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -140,11 +140,22 @@ jobs: uses: cake-build/cake-action@v3 with: target: UnitTests # LatestFramework - - name: Prepare Coveralls + - name: Coverage files run: ./.github/steps/prepare-coveralls.sh - name: Coveralls if: env.COVERALLS_coverage_file_exists == 'true' uses: coverallsapp/github-action@v2 with: - fail-on-error: false + # fail-on-error: false file: ${{ env.COVERALLS_coverage_file }} + continue-on-error: true + - name: Codecov + if: env.COVERALLS_coverage_file_exists == 'true' + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ThreeMammals/Ocelot + fail_ci_if_error: true + files: ${{ env.COVERALLS_coverage_file }} + flags: unittests + continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12f3f9c16..90ecc5f06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -165,7 +165,7 @@ jobs: OCELOT_GITHUB_API_KEY: ${{ secrets.OCELOT_GITHUB_API_KEY }} OCELOT_NUGET_API_KEY_2025: ${{ secrets.OCELOT_NUGET_API_KEY_2025 }} # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - - name: Prepare Coveralls + - name: Coverage files run: ./.github/steps/prepare-coveralls.sh - name: Coveralls if: env.COVERALLS_coverage_file_exists == 'true' @@ -173,5 +173,14 @@ jobs: with: file: ${{ env.COVERALLS_coverage_file }} compare-ref: main - # env: - # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + continue-on-error: true + - name: Codecov + if: env.COVERALLS_coverage_file_exists == 'true' + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ThreeMammals/Ocelot + fail_ci_if_error: true + files: ${{ env.COVERALLS_coverage_file }} + flags: unittests + continue-on-error: true From 8a84edb0aedfde4ff0955ad9a3ba4bb40bff56a2 Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 16:35:15 +0300 Subject: [PATCH 4/7] Codecov config file --- codecov.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..cb2eac328 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +coverage: + status: + project: #add everything under here, more options at https://docs.codecov.com/docs/commit-status + default: + target: auto + threshold: 0% + base: auto + +comment: + layout: "reach, diff, flags, tree" + behavior: default + +github_checks: + annotations: true From 0949d222193ef29e8a328c75598a0160bf9b5f9e Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 16:45:46 +0300 Subject: [PATCH 5/7] Codecov badge in README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da9f939e2..5b5ea61cb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Development Status](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml/badge.svg)](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml) [![ReadTheDocs](https://readthedocs.org/projects/ocelot/badge/?version=develop&style=flat-square)](https://app.readthedocs.org/projects/ocelot/builds/?version__slug=develop) [![Coveralls](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=develop)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=develop) +[![Codecov](https://codecov.io/gh/ThreeMammals/Ocelot/branch/develop/graph/badge.svg)](https://codecov.io/gh/ThreeMammals/Ocelot) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ThreeMammals/Ocelot/blob/main/LICENSE.md) [![NuGet](https://img.shields.io/nuget/v/Ocelot?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/Ocelot/ "Download Ocelot from NuGet.org") [![Downloads](https://img.shields.io/nuget/dt/Ocelot?logo=nuget&label=Downloads)](https://www.nuget.org/packages/Ocelot/ "Total Ocelot downloads from NuGet.org") @@ -30,7 +31,7 @@ There is a piece of middleware that maps the `HttpResponseMessage` onto the `Htt That is basically it, with a bunch of other features! ## Install -Ocelot is designed to work with [ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/) and it targets `net8.0` [LTS](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#release-types) and `net9.0` [STS](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#release-types) target framework monikers ([TFMs](https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)). [^1] +Ocelot is designed to work with [ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/) and it targets `net9.0` [STS](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#release-types) and `net8.0`, `net10.0` [LTS](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#release-types) target framework monikers ([TFMs](https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)). [^1] Install [Ocelot](https://www.nuget.org/packages/Ocelot) package and its dependencies using NuGet package manager: ```powershell From 14c7f6dd163bcc0cf00a905c308ed8c7a9ec9ca5 Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 17:16:23 +0300 Subject: [PATCH 6/7] Use shields.io as a proxy to display Coveralls badge --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b5ea61cb..08062ad6b 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ [![Release Status](https://github.com/ThreeMammals/Ocelot/actions/workflows/release.yml/badge.svg)](https://github.com/ThreeMammals/Ocelot/actions/workflows/release.yml) [![Development Status](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml/badge.svg)](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml) [![ReadTheDocs](https://readthedocs.org/projects/ocelot/badge/?version=develop&style=flat-square)](https://app.readthedocs.org/projects/ocelot/builds/?version__slug=develop) -[![Coveralls](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=develop)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=develop) -[![Codecov](https://codecov.io/gh/ThreeMammals/Ocelot/branch/develop/graph/badge.svg)](https://codecov.io/gh/ThreeMammals/Ocelot) + +[![coveralls](https://img.shields.io/coveralls/github/ThreeMammals/Ocelot/develop?label=coveralls&logo=coveralls&logoColor=white)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=develop) +[![codecov](https://codecov.io/gh/ThreeMammals/Ocelot/branch/develop/graph/badge.svg)](https://codecov.io/gh/ThreeMammals/Ocelot) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ThreeMammals/Ocelot/blob/main/LICENSE.md) [![NuGet](https://img.shields.io/nuget/v/Ocelot?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/Ocelot/ "Download Ocelot from NuGet.org") [![Downloads](https://img.shields.io/nuget/dt/Ocelot?logo=nuget&label=Downloads)](https://www.nuget.org/packages/Ocelot/ "Total Ocelot downloads from NuGet.org") From 9173c311cba0a6ccbf26291965eda4a977973844 Mon Sep 17 00:00:00 2001 From: Raman Maksimchuk Date: Thu, 26 Feb 2026 17:25:23 +0300 Subject: [PATCH 7/7] Line up badges --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08062ad6b..770895b22 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ [![Release Status](https://github.com/ThreeMammals/Ocelot/actions/workflows/release.yml/badge.svg)](https://github.com/ThreeMammals/Ocelot/actions/workflows/release.yml) [![Development Status](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml/badge.svg)](https://github.com/ThreeMammals/Ocelot/actions/workflows/develop.yml) [![ReadTheDocs](https://readthedocs.org/projects/ocelot/badge/?version=develop&style=flat-square)](https://app.readthedocs.org/projects/ocelot/builds/?version__slug=develop) - [![coveralls](https://img.shields.io/coveralls/github/ThreeMammals/Ocelot/develop?label=coveralls&logo=coveralls&logoColor=white)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=develop) [![codecov](https://codecov.io/gh/ThreeMammals/Ocelot/branch/develop/graph/badge.svg)](https://codecov.io/gh/ThreeMammals/Ocelot) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ThreeMammals/Ocelot/blob/main/LICENSE.md) [![NuGet](https://img.shields.io/nuget/v/Ocelot?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/Ocelot/ "Download Ocelot from NuGet.org") [![Downloads](https://img.shields.io/nuget/dt/Ocelot?logo=nuget&label=Downloads)](https://www.nuget.org/packages/Ocelot/ "Total Ocelot downloads from NuGet.org") + [~docspassing]: https://img.shields.io/badge/Docs-passing-44CC11?style=flat-square [~docsfailing]: https://img.shields.io/badge/Docs-failing-red?style=flat-square @@ -116,3 +116,4 @@ If you want to contribute for the first time, we suggest looking at a [![label: [^5]: Ocelot supports the following service discovery providers: (**1**) [Consul](https://www.consul.io) through the [Ocelot.Provider.Consul](https://www.nuget.org/packages/Ocelot.Provider.Consul) extension package, (**2**) [Kubernetes](https://kubernetes.io) via the [Ocelot.Provider.Kubernetes](https://www.nuget.org/packages/Ocelot.Provider.Kubernetes) extension package, and (**3**) [Netflix Eureka](https://spring.io/projects/spring-cloud-netflix), which utilizes the [Steeltoe.Discovery.Eureka](https://www.nuget.org/packages/Steeltoe.Discovery.Eureka) package referenced within the [Ocelot.Provider.Eureka](https://www.nuget.org/packages/Ocelot.Provider.Eureka) extension package. Additionally, Ocelot supports (**4**) Azure [Service Fabric](https://azure.microsoft.com/en-us/products/service-fabric/) for service discovery, along with special modes such as [Dynamic Routing](https://ocelot.readthedocs.io/en/latest/features/servicediscovery.html#dynamic-routing) and [Custom Providers](https://ocelot.readthedocs.io/en/latest/features/servicediscovery.html#custom-providers). [^6]: Ocelot does not directly support [GraphQL](https://graphql.org/). Developers can easily integrate the [GraphQL for .NET](https://github.com/graphql-dotnet/graphql-dotnet) library. [^7]: See all [labels](https://github.com/ThreeMammals/Ocelot/issues/labels) for the repository, which are useful for searching and filtering. +