From 19ca8a8eb857af230fe761b48e68ba65aab2f737 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 16:27:15 +0100 Subject: [PATCH 1/7] docs: Refactor intro for validating coverage setup --- docs/index.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index 301ce8fa..ca994133 100644 --- a/docs/index.md +++ b/docs/index.md @@ -210,17 +210,20 @@ The recommended way to do this is by using a CI/CD platform that automatically r ## 3. Validating that the coverage setup is complete {: id="validating-coverage"} -Codacy displays the code coverage in each branch, as well as the evolution of code coverage between commits and the code coverage variation introduced by pull requests. Because of this, to ensure that all code coverage metrics are available on Codacy, you must have successfully uploaded coverage data and analyzed: +Codacy displays the code coverage in each branch, as well as the evolution of code coverage between commits and the code coverage variation introduced by pull requests. + +Because of this, to ensure that all code coverage metrics are available on Codacy, you must have successfully uploaded coverage data and analyzed: - The last two commits in each branch -- The common ancestor commits between pull request branches and their target branches +- The common ancestor commit of each pull request branch and its target branch -The example below shows that after pushing a commit that correctly sets up coverage on the main branch: +!!! note "Example" + The example below shows that after pushing a commit that correctly sets up coverage on the main branch: -- Codacy will report coverage metrics for all subsequent commits and pull requests relative to the main branch -- Codacy won't report coverage metrics for commits and pull requests that are relative to older branches where the coverage setup wasn't performed yet + - Codacy will report coverage metrics for all subsequent commits and pull requests relative to the main branch + - Codacy won't report coverage metrics for commits and pull requests that are relative to older branches where the coverage setup wasn't performed yet -![Setting up coverage on the main branch](images/coverage-validate.png) + ![Setting up coverage on the main branch](images/coverage-validate.png) To validate that the coverage setup is complete: From 0d63707635bfbaa72bbdae5e18dc5b6707bcd59a Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 16:28:00 +0100 Subject: [PATCH 2/7] docs: Move checking the coverage logs list to the validation section --- docs/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index ca994133..7fc1fe21 100644 --- a/docs/index.md +++ b/docs/index.md @@ -202,12 +202,6 @@ The recommended way to do this is by using a CI/CD platform that automatically r !!! note Be sure to also check the [instructions for more advanced scenarios](uploading-coverage-in-advanced-scenarios.md) while uploading the coverage data to Codacy, such as when running parallel tests, using monorepos, or testing source code in multiple or unsupported languages. -1. Make sure that Codacy received the coverage data successfully for the **correct commit UUID and branch**. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration**: - - ![Testing the coverage integration](images/coverage-test-integration.png) - - If you make adjustments to your setup and upload new coverage data, click the button **Test integration** to refresh the table. - ## 3. Validating that the coverage setup is complete {: id="validating-coverage"} Codacy displays the code coverage in each branch, as well as the evolution of code coverage between commits and the code coverage variation introduced by pull requests. @@ -227,6 +221,12 @@ Because of this, to ensure that all code coverage metrics are available on Codac To validate that the coverage setup is complete: +1. Make sure that Codacy received the coverage data successfully for the **correct commit UUID and branch**. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration**: + + ![Testing the coverage integration](images/coverage-test-integration.png) + + If you make adjustments to your setup and upload new coverage data, click the button **Test integration** to refresh the table. + 1. Wait until there are **at least two commits** that have uploaded coverage data to Codacy and were successfully analyzed by Codacy. !!! important From e9526e136e3cf2ff6929a40fda9acea4b99001fc Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 16:36:48 +0100 Subject: [PATCH 3/7] docs: Add TODO comments --- docs/index.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 7fc1fe21..51b0f8f3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -227,9 +227,16 @@ To validate that the coverage setup is complete: If you make adjustments to your setup and upload new coverage data, click the button **Test integration** to refresh the table. -1. Wait until there are **at least two commits** that have uploaded coverage data to Codacy and were successfully analyzed by Codacy. + + +1. Make sure that there are **at least two commits** that uploaded coverage data to Codacy and were successfully analyzed by Codacy. !!! important + Codacy only takes the uploaded coverage data into account after successfully analyzing each commit. Make sure that you [invite or ask your team members to join your organization on Codacy](../organizations/managing-people/#adding-people) so that Codacy analyzes their commits on private repositories. From 915940c1fde35be0411b7022a3371c0dd78a5c10 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 16:37:13 +0100 Subject: [PATCH 4/7] docs: Small edits --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 51b0f8f3..cf8b6763 100644 --- a/docs/index.md +++ b/docs/index.md @@ -219,9 +219,9 @@ Because of this, to ensure that all code coverage metrics are available on Codac ![Setting up coverage on the main branch](images/coverage-validate.png) -To validate that the coverage setup is complete: +Follow these instructions to validate that your coverage setup is working correctly: -1. Make sure that Codacy received the coverage data successfully for the **correct commit UUID and branch**. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration**: +1. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration** to make sure that Codacy received the coverage data successfully for the **correct commit UUID and branch**, and that it processed the coverage data successfully. ![Testing the coverage integration](images/coverage-test-integration.png) @@ -241,7 +241,7 @@ To validate that the coverage setup is complete: Make sure that you [invite or ask your team members to join your organization on Codacy](../organizations/managing-people/#adding-people) so that Codacy analyzes their commits on private repositories. -1. Check that Codacy displays the coverage information for the latest commits and pull requests: +1. Check that Codacy displays the coverage information for the latest commits and pull requests. ![Coverage data displayed on Codacy](images/coverage-codacy-ui.png) From 51a72157576384ca774ead59aa61614feebdafac Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 16:42:44 +0100 Subject: [PATCH 5/7] docs: Add link to commit UUID detection Also changes commit "SHA hash" to "UUID". --- docs/index.md | 2 +- docs/troubleshooting-common-issues.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index cf8b6763..6b267105 100644 --- a/docs/index.md +++ b/docs/index.md @@ -221,7 +221,7 @@ Because of this, to ensure that all code coverage metrics are available on Codac Follow these instructions to validate that your coverage setup is working correctly: -1. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration** to make sure that Codacy received the coverage data successfully for the **correct commit UUID and branch**, and that it processed the coverage data successfully. +1. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration** to make sure that Codacy received the coverage data successfully for the **[correct commit UUID](troubleshooting-common-issues.md#commit-detection) and branch**, and that it processed the coverage data successfully. ![Testing the coverage integration](images/coverage-test-integration.png) diff --git a/docs/troubleshooting-common-issues.md b/docs/troubleshooting-common-issues.md index 3dcc585b..cf5e004f 100644 --- a/docs/troubleshooting-common-issues.md +++ b/docs/troubleshooting-common-issues.md @@ -21,9 +21,9 @@ If the Codacy Coverage Reporter correctly uploaded your coverage report but the ![Commits that must have coverage data](images/coverage-pr-commits.png) -### Commit SHA hash detection {: id="commit-detection"} +## Commit UUID detection {: id="commit-detection"} -The Codacy Coverage Reporter automatically detects the commit SHA hash to associate with the coverage data from the following CI/CD platforms: +The Codacy Coverage Reporter automatically detects the UUID or SHA hash of the current commit to associate with the coverage data when you're using one of the following CI/CD platforms: - Appveyor - AWS CodeBuild @@ -48,7 +48,7 @@ The Codacy Coverage Reporter automatically detects the commit SHA hash to associ If the Codacy Coverage Reporter fails to detect the current commit from the CI workflow context, it will use the current commit from the local Git repository instead. -However, you can also force using a specific commit SHA hash with the flag `--commit-uuid`. For example: +However, you can also force using a specific commit UUID with the flag `--commit-uuid`. For example: ```bash bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ From 737041e7bcf5d6a9b53962eb8bf1853c25345710 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 3 Aug 2022 17:41:04 +0100 Subject: [PATCH 6/7] docs: Change internal lingo commit UUID to commit SHA-1 hash --- docs/index.md | 6 +++--- docs/troubleshooting-common-issues.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6b267105..eb1bf04f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -197,7 +197,7 @@ The recommended way to do this is by using a CI/CD platform that automatically r bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ``` - Check the console output to validate that the Codacy Coverage Reporter **detected the correct commit UUID** and **successfully uploaded** the coverage data to Codacy. If you need help, [check the troubleshooting page](troubleshooting-common-issues.md) for solutions to the most common setup issues. + Check the console output to validate that the Codacy Coverage Reporter **detected the correct commit SHA-1 hash** and **successfully uploaded** the coverage data to Codacy. If you need help, [check the troubleshooting page](troubleshooting-common-issues.md) for solutions to the most common setup issues. !!! note Be sure to also check the [instructions for more advanced scenarios](uploading-coverage-in-advanced-scenarios.md) while uploading the coverage data to Codacy, such as when running parallel tests, using monorepos, or testing source code in multiple or unsupported languages. @@ -221,7 +221,7 @@ Because of this, to ensure that all code coverage metrics are available on Codac Follow these instructions to validate that your coverage setup is working correctly: -1. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration** to make sure that Codacy received the coverage data successfully for the **[correct commit UUID](troubleshooting-common-issues.md#commit-detection) and branch**, and that it processed the coverage data successfully. +1. On Codacy, open your **Repository Settings**, tab **Coverage**, and observe the list of recent coverage reports in the section **Test your integration** to make sure that Codacy received the coverage data successfully for the **[correct commit SHA-1 hash](troubleshooting-common-issues.md#commit-detection) and branch**, and that it processed the coverage data successfully. ![Testing the coverage integration](images/coverage-test-integration.png) @@ -253,6 +253,6 @@ Follow these instructions to validate that your coverage setup is working correc - URL of your repository on Codacy - Your CI/CD configuration files and the name of your CI/CD platform - Full console output of your CI/CD when running the Codacy Coverage Reporter - - Branch name and commit UUID corresponding to the CI/CD output + - Branch name and commit SHA-1 hash corresponding to the CI/CD output - Test coverage report that you're uploading to Codacy - Any other relevant information or screenshots of your setup diff --git a/docs/troubleshooting-common-issues.md b/docs/troubleshooting-common-issues.md index cf5e004f..2ad15974 100644 --- a/docs/troubleshooting-common-issues.md +++ b/docs/troubleshooting-common-issues.md @@ -21,9 +21,9 @@ If the Codacy Coverage Reporter correctly uploaded your coverage report but the ![Commits that must have coverage data](images/coverage-pr-commits.png) -## Commit UUID detection {: id="commit-detection"} +## Commit SHA-1 hash detection {: id="commit-detection"} -The Codacy Coverage Reporter automatically detects the UUID or SHA hash of the current commit to associate with the coverage data when you're using one of the following CI/CD platforms: +The Codacy Coverage Reporter automatically detects the SHA-1 hash of the current commit to associate with the coverage data when you're using one of the following CI/CD platforms: - Appveyor - AWS CodeBuild @@ -48,7 +48,7 @@ The Codacy Coverage Reporter automatically detects the UUID or SHA hash of the c If the Codacy Coverage Reporter fails to detect the current commit from the CI workflow context, it will use the current commit from the local Git repository instead. -However, you can also force using a specific commit UUID with the flag `--commit-uuid`. For example: +However, you can also force using a specific commit SHA-1 hash with the flag `--commit-uuid`. For example: ```bash bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ From 17657962aa2dd24e9119597c60b5ff8c68e03302 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Wed, 17 Aug 2022 17:20:54 +0100 Subject: [PATCH 7/7] docs: Fix broken links --- docs/index.md | 2 +- docs/troubleshooting-common-issues.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index eb1bf04f..7336353f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -65,7 +65,7 @@ The following table contains example coverage tools that generate reports in for Go Golang Code Coverage - Golang report files don't have a specific name. Because of this, later in the setup process you must follow specific instructions while submitting coverage to Codacy. + Golang report files don't have a specific name. Because of this, later in the setup process you must follow specific instructions while submitting coverage to Codacy. Java diff --git a/docs/troubleshooting-common-issues.md b/docs/troubleshooting-common-issues.md index 2ad15974..b1bfb1b8 100644 --- a/docs/troubleshooting-common-issues.md +++ b/docs/troubleshooting-common-issues.md @@ -80,7 +80,7 @@ If you get a `com.fasterxml.jackson.core.JsonParseException` error while uploadi There are some ways you can solve this: -- Split your coverage reports into smaller files and [upload them to Codacy one at a time](index.md#multiple-reports). +- Split your coverage reports into smaller files and [upload them to Codacy one at a time](../uploading-coverage-in-advanced-scenarios/#multiple-reports). - **If you're using dotCover to generate coverage reports for your C# projects**, you should [exclude xUnit files](https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html#filters_cmd) from the coverage analysis as follows: