From 32d3112ad3415243572928a70e64e382cbdfd43b Mon Sep 17 00:00:00 2001 From: pawel-gudel-eliatra <136344230+pawel-gudel-eliatra@users.noreply.github.com> Date: Thu, 17 Aug 2023 22:14:33 +0200 Subject: [PATCH] [Enchancement] Removed dependency between "test" and "jacocoTestReport" (#2935) As a part of discussions in #2861 there's been determined that CI workflow in Github Actions is excluding a lot of unnecessary task. @nibix created #2913 to address this problem. Most of the unneeded tasks has been already removed in #2861. This PR removes last existing part. @peternied's confirmed removal of dependency in his [comment](https://github.com/opensearch-project/security/issues/2913#issuecomment-1611985104). This change removes the dependency between "_jacocoTestReport_" and "_test_" tasks. Specifically the dependency that forces to start "_test_" task always when "_jacocoTestReport_" is called. This allows us to always generate coverage report in the end of every task run in "CI" workflow without having to exclude "_test_" task in every single one of them. Unfortunately this will break functionality to create code coverage by starting only "_jacocoTestReport_" task. It looks like this was not used widely and was certainly not used in any of Github Actions Workflows. This will not break creating coverage reports in the end of "_test_" task. Signed-off-by: Pawel Gudel --- .github/workflows/ci.yml | 1 - build.gradle | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 912304f8d7..0c86f82e26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,6 @@ jobs: cache-disabled: true arguments: | ${{ matrix.gradle_task }} -Dbuild.snapshot=false - -x test - name: Coverage uses: codecov/codecov-action@v3 diff --git a/build.gradle b/build.gradle index 163b841849..66b0ba2d06 100644 --- a/build.gradle +++ b/build.gradle @@ -398,8 +398,6 @@ tasks.withType(JavaCompile) { } tasks.test.finalizedBy(jacocoTestReport) // report is always generated after tests run -tasks.jacocoTestReport.dependsOn(test) // tests are required to run before generating the report - allprojects { tasks.withType(Javadoc).all { enabled = false }