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/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/pr.yml b/.github/workflows/pr.yml index 7cfd644d9..e0807e82c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -169,10 +169,22 @@ 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 }} + 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 diff --git a/README.md b/README.md index da9f939e2..770895b22 100644 --- a/README.md +++ b/README.md @@ -3,10 +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://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=develop)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=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 @@ -30,7 +32,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 @@ -114,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. + 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