From 917b4db6c381b0e77462e4cc810c22151ae8b8d5 Mon Sep 17 00:00:00 2001 From: Bertrand Renuart Date: Tue, 14 Sep 2021 21:32:43 +0200 Subject: [PATCH 1/6] Produce test coverage data using Jacoco and upload report to Codecov --- .github/workflows/build.yml | 5 ++++ pom.xml | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4427903..cbdea355 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,11 @@ jobs: path: '**/target/surefire-reports/**' if-no-files-found: ignore + - name: Upload Test Coverage + uses: codecov/codecov-action@v2 + with: + files: target/site/jacoco/jacoco.xml + release: name: release runs-on: ubuntu-20.04 diff --git a/pom.xml b/pom.xml index 91c7a80a..b661733e 100644 --- a/pom.xml +++ b/pom.xml @@ -413,6 +413,29 @@ + + + + org.jacoco + jacoco-maven-plugin + + + jacoco-prepare-agent + process-test-classes + + prepare-agent + + + + jacoco-report + verify + + report + + + + @@ -544,6 +567,29 @@ maven-resources-plugin ${maven-resources-plugin.version} + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + + net/logstash/** + + + + + XML + HTML + + + From 149b81b1c5ce09067bdb69188237fd7affea1431 Mon Sep 17 00:00:00 2001 From: Bertrand Renuart Date: Wed, 17 Nov 2021 20:24:39 +0100 Subject: [PATCH 2/6] Add CODECOV_TOKEN --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbdea355..9f04b6af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: - name: Test Jackson 2.12 run: ./mvnw --batch-mode --no-transfer-progress --show-version --settings .github/maven/settings.xml -Djackson.version=2.12.5 surefire:test - - name: Upload Test Reports + - name: Upload Test Reports to Github uses: actions/upload-artifact@v2 if: ${{ always() }} with: @@ -46,10 +46,12 @@ jobs: path: '**/target/surefire-reports/**' if-no-files-found: ignore - - name: Upload Test Coverage + - name: Upload Test Coverage to Codecov uses: codecov/codecov-action@v2 with: files: target/site/jacoco/jacoco.xml + env: + CODECOV_TOKEN: db650146-b71e-4afd-879d-88bc3b64e111 release: name: release From 5f115882ae982aa91371e910dfe75cf07c62ab40 Mon Sep 17 00:00:00 2001 From: Bertrand Renuart Date: Wed, 17 Nov 2021 20:39:10 +0100 Subject: [PATCH 3/6] Replace TABs by Spaces --- pom.xml | 134 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/pom.xml b/pom.xml index b661733e..c6b70e0c 100644 --- a/pom.xml +++ b/pom.xml @@ -414,28 +414,28 @@ - - - org.jacoco - jacoco-maven-plugin - - - jacoco-prepare-agent - process-test-classes - - prepare-agent - - - - jacoco-report - verify - - report - - - - + + + org.jacoco + jacoco-maven-plugin + + + jacoco-prepare-agent + process-test-classes + + prepare-agent + + + + jacoco-report + verify + + report + + + + @@ -568,28 +568,28 @@ ${maven-resources-plugin.version} - - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - - - net/logstash/** - - - - - XML - HTML - - - + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + + net/logstash/** + + + + + XML + HTML + + + @@ -651,30 +651,30 @@ - - - m2e - - - m2e.version - - + + + m2e + + + m2e.version + + - - - target-eclipse - - + + + target-eclipse + +