From a6d0dac3408dd1b580782f8e4cf81f68d8e92432 Mon Sep 17 00:00:00 2001 From: Haotian Zhang <928016560@qq.com> Date: Tue, 28 Jun 2022 20:49:36 +0800 Subject: [PATCH] feat:Add GitHub action of codecov.yml. (#330) Co-authored-by: lepdou --- .github/workflows/codecov.yml | 32 +++++++++++++++++++ .github/workflows/junit_test.yml | 6 ---- CHANGELOG.md | 1 + .../discovery/PolarisDiscoveryHandler.java | 2 +- spring-cloud-tencent-dependencies/pom.xml | 2 +- 5 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 000000000..c0ef90771 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,32 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Codecov + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout codes + uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Test with Maven + run: mvn -B test --file pom.xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + file: ${{ github.workspace }}/target/site/jacoco/jacoco.xml diff --git a/.github/workflows/junit_test.yml b/.github/workflows/junit_test.yml index 51e9cce15..57cfae035 100644 --- a/.github/workflows/junit_test.yml +++ b/.github/workflows/junit_test.yml @@ -41,11 +41,5 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- -# - name: Build with Maven -# run: mvn -B package --file pom.xml - name: Test with Maven run: mvn -B test --file pom.xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - file: '**/target/site/jacoco/jacoco.xml' diff --git a/CHANGELOG.md b/CHANGELOG.md index 3070f67e9..7a2a8bee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,4 +14,5 @@ - [Feature:add restTemplate Report Polaris](https://github.com/Tencent/spring-cloud-tencent/pull/300) - [Fix the current limiting effect is that other requests cannot be processed when queuing at a constant speed](https://github.com/Tencent/spring-cloud-tencent/pull/317) - [Fix config file format misspell](https://github.com/Tencent/spring-cloud-tencent/pull/320) +- [feat:Add GitHub action of codecov.yml.](https://github.com/Tencent/spring-cloud-tencent/pull/330) - [Feature: add spring cloud tencent logo](https://github.com/Tencent/spring-cloud-tencent/pull/331) diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryHandler.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryHandler.java index e1691ea4e..a55443561 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryHandler.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryHandler.java @@ -61,7 +61,7 @@ public class PolarisDiscoveryHandler { GetHealthyInstancesRequest getHealthyInstancesRequest = new GetHealthyInstancesRequest(); getHealthyInstancesRequest.setNamespace(namespace); getHealthyInstancesRequest.setService(service); - return polarisConsumer.getHealthyInstancesInstance(getHealthyInstancesRequest); + return polarisConsumer.getHealthyInstances(getHealthyInstancesRequest); } /** diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 4bcf54c97..af9b3c69c 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -73,7 +73,7 @@ 1.6.0-2020.0.5-SNAPSHOT - 1.6.1 + 1.7.0-SNAPSHOT 1.2.11 4.5.1 1.12.10