Skip to content

Commit e36c232

Browse files
authored
Include integration tests in windows workflow (#624)
Signed-off-by: Rupal Mahajan <[email protected]> Signed-off-by: Rupal Mahajan <[email protected]>
1 parent b5ea7ff commit e36c232

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/reports-scheduler-test-and-build-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Build with Gradle
6363
run: |
64-
./gradlew.bat build -x integTest -x jacocoTestReport
64+
./gradlew.bat build
6565
6666
- name: Create Artifact Path
6767
run: |
@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Build with Gradle
9696
run: |
97-
./gradlew build -x integTest -x jacocoTestReport
97+
./gradlew build
9898
9999
- name: Create Artifact Path
100100
run: |

build-tools/esplugin-coverage.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
* break if there are multiple nodes in the integTestCluster. But for now... it sorta works.
1818
*/
1919

20+
import org.apache.tools.ant.taskdefs.condition.Os
21+
apply plugin: 'jacoco'
22+
2023
// Get gradle to generate the required jvm agent arg for us using a dummy tasks of type Test. Unfortunately Elastic's
2124
// testing tasks don't derive from Test so the jacoco plugin can't do this automatically.
2225
def jacocoDir = "${buildDir}/jacoco"
@@ -61,7 +64,12 @@ allprojects{
6164
jacocoTestReport.dependsOn integTest
6265

6366
testClusters.integTest {
64-
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/')
67+
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
68+
// Replacing build with absolute path to fix the error "error opening zip file or JAR manifest missing : /build/tmp/expandedArchives/..../jacocoagent.jar"
69+
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('build',"${buildDir}")
70+
} else {
71+
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/')
72+
}
6573
systemProperty 'com.sun.management.jmxremote', "true"
6674
systemProperty 'com.sun.management.jmxremote.authenticate', "false"
6775
systemProperty 'com.sun.management.jmxremote.port', "7777"

0 commit comments

Comments
 (0)