From b9896d864bf6d3e5ad241a1e613118925944f753 Mon Sep 17 00:00:00 2001 From: Michael Siega Date: Fri, 13 Jan 2023 11:49:49 +0100 Subject: [PATCH 1/3] introduce code coverage report step --- .github/workflows/gradle.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fedc29169aa3..63e8982220b3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -643,6 +643,43 @@ jobs: attempt_limit: 3 attempt_delay: 5000 # in ms + - name: Add coverage to PR + if: github.event_name == 'pull_request' + id: jacoco + uses: madrapps/jacoco-report@v1.3 + with: + paths: | + ${{ github.workspace }}/airbyte-analytics/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-api/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-bootloader/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons-cli/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons-docker/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons-protocol/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons-temporal/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-commons-worker/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-config/init/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-config/specs/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-config/config-persistence/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-config/config-models/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-container-orchestrator/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-db/db-lib/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-json-validation/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-metrics/reporter/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-metrics/metrics-lib/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-notification/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-oauth/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-persistence/job-persistence/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-protocol/protocol-models/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-queue/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-server/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-test-utils/build/reports/jacoco/test/jacocoTestReport.xml, + ${{ github.workspace }}/airbyte-workers/build/reports/jacoco/test/jacocoTestReport.xml + token: ${{ secrets.GITHUB_TOKEN }} + min-coverage-overall: 40 + min-coverage-changed-files: 60 + debug-mode: false + - name: Integration test uses: Wandalen/wretry.action@master with: From b2d54177362b966a3c267dfea5dfc52cf341e101 Mon Sep 17 00:00:00 2001 From: Michael Siega Date: Fri, 13 Jan 2023 12:25:58 +0100 Subject: [PATCH 2/3] remove airbyte-queue jacoco report since it isn't being generated by the build yet --- .github/workflows/gradle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 63e8982220b3..1bf486284f16 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -671,7 +671,6 @@ jobs: ${{ github.workspace }}/airbyte-oauth/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-persistence/job-persistence/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-protocol/protocol-models/build/reports/jacoco/test/jacocoTestReport.xml, - ${{ github.workspace }}/airbyte-queue/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-server/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-test-utils/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-workers/build/reports/jacoco/test/jacocoTestReport.xml From 09245365e721704fe9df842b5153ca1d0c5bea27 Mon Sep 17 00:00:00 2001 From: Michael Siega Date: Fri, 13 Jan 2023 19:13:42 +0100 Subject: [PATCH 3/3] leave pointer to wildcard support and tweak coverage threshold --- .github/workflows/gradle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1bf486284f16..0b5920768520 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -648,6 +648,7 @@ jobs: id: jacoco uses: madrapps/jacoco-report@v1.3 with: + # todo(mfsiega-airbyte): when v1.4 is released, use wildcards per https://github.com/Madrapps/jacoco-report/issues/20. paths: | ${{ github.workspace }}/airbyte-analytics/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-api/build/reports/jacoco/test/jacocoTestReport.xml, @@ -675,7 +676,7 @@ jobs: ${{ github.workspace }}/airbyte-test-utils/build/reports/jacoco/test/jacocoTestReport.xml, ${{ github.workspace }}/airbyte-workers/build/reports/jacoco/test/jacocoTestReport.xml token: ${{ secrets.GITHUB_TOKEN }} - min-coverage-overall: 40 + min-coverage-overall: 25 min-coverage-changed-files: 60 debug-mode: false