Skip to content

Commit

Permalink
[Enchancement] Removed dependency between "test" and "jacocoTestRepor…
Browse files Browse the repository at this point in the history
…t" (opensearch-project#2935)

As a part of discussions in opensearch-project#2861 there's been determined that CI
workflow in Github Actions is excluding a lot of unnecessary task.
@nibix created opensearch-project#2913 to address this problem. Most of the unneeded tasks
has been already removed in opensearch-project#2861. This PR removes last existing part.
@peternied's confirmed removal of dependency in his
[comment](opensearch-project#2913 (comment)).

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 <[email protected]>
  • Loading branch information
pawel-gudel-eliatra authored Aug 17, 2023
1 parent 847f911 commit 32d3112
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
cache-disabled: true
arguments: |
${{ matrix.gradle_task }} -Dbuild.snapshot=false
-x test
- name: Coverage
uses: codecov/codecov-action@v3
Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 32d3112

Please sign in to comment.