forked from airbytehq/airbyte-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (96 loc) · 4.38 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
plugins {
id 'java'
}
// The java plugin automatically compiles/runs tests in the test source set (./src/test directory). Since we want acceptance tests to run
// only when explicitly requested, we put them in a separate source set, specify the sourceset's dependencies via configuration extensions below,
// and create a custom test task that can be invoked to run acceptance tests.
sourceSets {
acceptanceTests {
java {
srcDir("src/acceptanceTests/java")
}
resources {
srcDir("src/acceptanceTests/resources")
}
}
automaticMigrationAcceptanceTest {
java {
srcDir("src/automaticMigrationAcceptanceTest/java")
}
resources {
srcDir("src/automaticMigrationAcceptanceTest/resources")
}
}
}
// Gradle links configurations with the name xImplementation or xRuntimeOnly etc.. to the source set named x. Therefore, any deps specified
// using the extensions below apply only to this sourceset and not any other code in the project.
configurations {
acceptanceTestsImplementation.extendsFrom testImplementation
acceptanceTestsRuntimeOnly.extendsFrom testRuntimeOnly
automaticMigrationAcceptanceTestImplementation.extendsFrom testImplementation
automaticMigrationAcceptanceTestRuntimeOnly.extendsFrom testRuntimeOnly
}
dependencies {
implementation project(':airbyte-api')
implementation project(':airbyte-container-orchestrator')
implementation 'io.fabric8:kubernetes-client:5.12.2'
implementation libs.platform.testcontainers
acceptanceTestsImplementation project(':airbyte-api')
acceptanceTestsImplementation project(':airbyte-commons')
acceptanceTestsImplementation project(':airbyte-commons-temporal')
acceptanceTestsImplementation project(':airbyte-config:config-models')
acceptanceTestsImplementation project(':airbyte-config:config-persistence')
acceptanceTestsImplementation project(':airbyte-db:db-lib')
acceptanceTestsImplementation project(':airbyte-tests')
acceptanceTestsImplementation project(':airbyte-test-utils')
acceptanceTestsImplementation project(':airbyte-commons-worker')
acceptanceTestsImplementation 'com.fasterxml.jackson.core:jackson-databind'
acceptanceTestsImplementation 'io.github.cdimascio:java-dotenv:3.0.0'
acceptanceTestsImplementation libs.temporal.sdk
acceptanceTestsImplementation 'org.apache.commons:commons-csv:1.4'
acceptanceTestsImplementation libs.platform.testcontainers.postgresql
acceptanceTestsImplementation libs.postgresql
acceptanceTestsImplementation 'org.bouncycastle:bcprov-jdk15on:1.66'
acceptanceTestsImplementation 'org.bouncycastle:bcpkix-jdk15on:1.66'
automaticMigrationAcceptanceTestImplementation project(':airbyte-api')
automaticMigrationAcceptanceTestImplementation project(':airbyte-commons')
automaticMigrationAcceptanceTestImplementation project(':airbyte-tests')
automaticMigrationAcceptanceTestImplementation project(':airbyte-test-utils')
automaticMigrationAcceptanceTestImplementation libs.platform.testcontainers
}
// test should run using the current version of the docker compose configuration.
task copyComposeFileForAcceptanceTests(type: Copy) {
from "${rootDir}/docker-compose.yaml"
into "${sourceSets.acceptanceTests.output.resourcesDir}"
}
task copyComposeFileForMigrationAcceptanceTests(type: Copy) {
from "${rootDir}/docker-compose.yaml"
into "${sourceSets.automaticMigrationAcceptanceTest.output.resourcesDir}"
}
assemble.dependsOn(project.tasks.copyComposeFileForAcceptanceTests)
assemble.dependsOn(project.tasks.copyComposeFileForMigrationAcceptanceTests)
task acceptanceTests(type: Test) {
testClassesDirs += sourceSets.acceptanceTests.output.classesDirs
classpath += sourceSets.acceptanceTests.runtimeClasspath
useJUnitPlatform()
failFast = true
testLogging() {
events "passed", "failed"
exceptionFormat "full"
}
mustRunAfter test
}
task automaticMigrationAcceptanceTest(type: Test) {
testClassesDirs += sourceSets.automaticMigrationAcceptanceTest.output.classesDirs
classpath += sourceSets.automaticMigrationAcceptanceTest.runtimeClasspath
useJUnitPlatform()
failFast = true
testLogging() {
events "passed", "failed"
exceptionFormat "full"
}
mustRunAfter test
}
tasks.withType(Copy) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}