From dd406830ad1ce890825e81a94921640334ec5e43 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 18:32:15 +0300 Subject: [PATCH 1/7] Add CodeCov configuration, enable test analytics --- .github/codecov.yaml | 65 +++++++++++++++++++++++++++++++ .github/workflows/integration.yml | 6 ++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/codecov.yaml diff --git a/.github/codecov.yaml b/.github/codecov.yaml new file mode 100644 index 0000000000..15a2613c88 --- /dev/null +++ b/.github/codecov.yaml @@ -0,0 +1,65 @@ +codecov: # see https://docs.codecov.com/docs/codecovyml-reference + branch: stable + +coverage: + status: # see https://docs.codecov.com/docs/commit-status + project: + default: + target: auto # minimum coverage ratio that the commit must meet to be considered a success + threshold: 5 # Allow the coverage to drop by %, and posting a success status + branches: + - main + - '[0-9].*' + +comment: # see https://docs.codecov.com/docs/pull-request-comments + layout: "condensed_header, condensed_files, condensed_footer" + behavior: new + require_changes: true # Only post comment if there are changes in coverage (positive or negative) + +component_management: # see https://docs.codecov.com/docs/components + individual_components: + - component_id: module_json + name: Lettuce JSON + paths: + - src/main/java/**/json/** + - component_id: module_api + name: Lettuce API + paths: + - src/main/java/**/api/** + - component_id: module_sentinel + name: Lettuce Sentinel + paths: + - src/main/java/**/sentinel/** + - component_id: module_cluster + name: Lettuce Cluster + paths: + - src/main/java/**/cluster/** + - component_id: module_pubsub + name: Lettuce PubSub + paths: + - src/main/java/**/pubsub/** + - component_id: module_masterreplica + name: Lettuce Master/Replica + paths: + - src/main/java/**/masterreplica/** + - src/main/java/**/masterslave/** + - component_id: module_metrics + name: Lettuce Metrics & Tracing + paths: + - src/main/java/**/metrics/** + - src/main/java/**/tracing/** + - component_id: module_core + name: Lettuce Core + paths: + - src/main/java/**/core/* + - src/main/java/**/codec/** + - src/main/java/**/dynamic/** + - src/main/java/**/event/** + - src/main/java/**/internal/** + - src/main/java/**/protocol/** + - src/main/java/**/resource/** + - src/main/java/**/support/** + - component_id: module_kotlin + name: Lettuce Kotlin + paths: + - src/main/kotlin/** \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3e796f739a..7823eed9f2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -54,6 +54,10 @@ jobs: JVM_OPTS: -Xmx3200m TERM: dumb - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + uses: codecov/test-results-action@v1 with: + fail_ci_if_error: false + files: + - ./target/surefire-reports/TEST* + - ./target/failsafe-reports/TEST* token: ${{ secrets.CODECOV_TOKEN }} From b72aa41390022d6998c3e825a67df6157b631b74 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 18:45:56 +0300 Subject: [PATCH 2/7] Issue in argument --- .github/workflows/integration.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 7823eed9f2..273a6982ee 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -57,7 +57,5 @@ jobs: uses: codecov/test-results-action@v1 with: fail_ci_if_error: false - files: - - ./target/surefire-reports/TEST* - - ./target/failsafe-reports/TEST* + files: ./target/surefire-reports/TEST*,./target/failsafe-reports/TEST* token: ${{ secrets.CODECOV_TOKEN }} From 24ade98ac9dd4e76ffcb0499cbca5ca8db7d86fb Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 20:45:31 +0300 Subject: [PATCH 3/7] ... and the right filename --- .github/{codecov.yaml => codecov.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{codecov.yaml => codecov.yml} (100%) diff --git a/.github/codecov.yaml b/.github/codecov.yml similarity index 100% rename from .github/codecov.yaml rename to .github/codecov.yml From 50af597626ebafa8cb58e600deb7d259fde4ee1b Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 20:58:51 +0300 Subject: [PATCH 4/7] ... perhaps by specifying exactly where the file is? --- .github/workflows/integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 273a6982ee..8d47d3f236 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -58,4 +58,5 @@ jobs: with: fail_ci_if_error: false files: ./target/surefire-reports/TEST*,./target/failsafe-reports/TEST* + codecov_yml_path: ./.github/codecov.yml token: ${{ secrets.CODECOV_TOKEN }} From 80ff69f30299f92215c557df3c172387caaae6ca Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 21:49:01 +0300 Subject: [PATCH 5/7] Polishing --- .github/codecov.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/spellcheck.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index 15a2613c88..4b4f2fe041 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,5 +1,5 @@ codecov: # see https://docs.codecov.com/docs/codecovyml-reference - branch: stable + branch: main coverage: status: # see https://docs.codecov.com/docs/commit-status diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 8461e501fe..a0c6d54045 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml config-name: release-drafter-config.yml diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index f3239f240b..bf102d541c 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check Spelling uses: rojopolis/spellcheck-github-actions@0.36.0 with: From eae7ab8aa2c89f4c0746dd43362ab3b8253da288 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 22:15:07 +0300 Subject: [PATCH 6/7] Check why configuration is not working --- .github/workflows/integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8d47d3f236..f73a6096a9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -59,4 +59,5 @@ jobs: fail_ci_if_error: false files: ./target/surefire-reports/TEST*,./target/failsafe-reports/TEST* codecov_yml_path: ./.github/codecov.yml + verbose: true token: ${{ secrets.CODECOV_TOKEN }} From fae9e8db9d71f4ed0faca0a26510806c5169ccec Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 22 Oct 2024 22:22:39 +0300 Subject: [PATCH 7/7] Final version --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f73a6096a9..9213271307 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -59,5 +59,5 @@ jobs: fail_ci_if_error: false files: ./target/surefire-reports/TEST*,./target/failsafe-reports/TEST* codecov_yml_path: ./.github/codecov.yml - verbose: true + verbose: ${{ runner.debug }} token: ${{ secrets.CODECOV_TOKEN }}