Skip to content

Commit 0ab6103

Browse files
authored
Merge pull request #7 from DataSQRL/end-to-end-testing
End to end testing
2 parents 38c2bdb + 8816603 commit 0ab6103

16 files changed

+6591
-183
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ jobs:
2727
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2828
restore-keys: ${{ runner.os }}-maven
2929

30-
- name: Build with Maven
31-
run: mvn -B package --file pom.xml
30+
- name: Download dependencies
31+
run: |
32+
set -x
33+
mvn -B dependency:go-offline de.qaware.maven:go-offline-maven-plugin:1.2.8:resolve-dependencies
34+
docker compose -f src/test/resources/docker-compose.yml pull
3235
33-
- name: Run JUnit tests
36+
- name: Build and test with Maven
3437
run: mvn -B verify -Pci

pom.xml

Lines changed: 122 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,23 @@
2626

2727
<properties>
2828
<gcf.skipInstallHooks>true</gcf.skipInstallHooks>
29-
<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
30-
<license-maven-plugin.version>4.6</license-maven-plugin.version>
3129

3230
<maven.deploy.skip>true</maven.deploy.skip>
31+
3332
<maven.compiler.source>11</maven.compiler.source>
3433
<maven.compiler.target>11</maven.compiler.target>
34+
35+
<license-maven-plugin.version>4.6</license-maven-plugin.version>
36+
<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
3537
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
38+
<surefire-plugin.version>3.5.0</surefire-plugin.version>
3639

3740
<flink.version>1.19.1</flink.version>
38-
3941
<slf4j.version>1.7.36</slf4j.version>
4042
<log4j.version>2.17.1</log4j.version>
43+
<feign.version>13.5</feign.version>
44+
45+
<picocli.version>4.7.6</picocli.version>
4146
</properties>
4247

4348
<dependencies>
@@ -93,6 +98,11 @@
9398
<scope>runtime</scope>
9499
</dependency>
95100

101+
<dependency>
102+
<groupId>info.picocli</groupId>
103+
<artifactId>picocli</artifactId>
104+
<version>${picocli.version}</version>
105+
</dependency>
96106
<dependency>
97107
<groupId>org.junit.jupiter</groupId>
98108
<artifactId>junit-jupiter</artifactId>
@@ -117,6 +127,20 @@
117127
<version>1.18.34</version>
118128
<scope>provided</scope>
119129
</dependency>
130+
131+
<dependency>
132+
<groupId>com.nextbreakpoint</groupId>
133+
<artifactId>com.nextbreakpoint.flinkclient</artifactId>
134+
<version>1.0.4</version>
135+
<scope>test</scope>
136+
</dependency>
137+
138+
<dependency>
139+
<groupId>org.awaitility</groupId>
140+
<artifactId>awaitility</artifactId>
141+
<version>4.2.2</version>
142+
<scope>test</scope>
143+
</dependency>
120144
</dependencies>
121145

122146
<build>
@@ -223,6 +247,10 @@
223247
<licenseSets>
224248
<licenseSet>
225249
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
250+
251+
<excludes>
252+
<exclude>src/test/resources/**</exclude>
253+
</excludes>
226254
</licenseSet>
227255
</licenseSets>
228256
<strictCheck>true</strictCheck>
@@ -244,6 +272,62 @@
244272
</execution>
245273
</executions>
246274
</plugin>
275+
276+
<plugin>
277+
<groupId>com.marvinformatics</groupId>
278+
<artifactId>docker-compose-maven-plugin</artifactId>
279+
<version>5.0.0</version>
280+
<configuration>
281+
<skip>${skipTests}</skip>
282+
<composeFile>${project.basedir}/src/test/resources/docker-compose.yml</composeFile>
283+
</configuration>
284+
<executions>
285+
<execution>
286+
<id>up</id>
287+
<goals>
288+
<goal>up</goal>
289+
</goals>
290+
<phase>pre-integration-test</phase>
291+
<configuration>
292+
<detachedMode>true</detachedMode>
293+
</configuration>
294+
</execution>
295+
<execution>
296+
<id>down</id>
297+
<goals>
298+
<goal>down</goal>
299+
</goals>
300+
<phase>verify</phase>
301+
<configuration>
302+
<removeVolumes>true</removeVolumes>
303+
</configuration>
304+
</execution>
305+
</executions>
306+
</plugin>
307+
308+
<plugin>
309+
<groupId>org.apache.maven.plugins</groupId>
310+
<artifactId>maven-surefire-plugin</artifactId>
311+
<version>${surefire-plugin.version}</version>
312+
<configuration>
313+
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
314+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
315+
<forkCount>0.5C</forkCount>
316+
</configuration>
317+
</plugin>
318+
319+
<plugin>
320+
<artifactId>maven-failsafe-plugin</artifactId>
321+
<version>${surefire-plugin.version}</version>
322+
<executions>
323+
<execution>
324+
<goals>
325+
<goal>integration-test</goal>
326+
<goal>verify</goal>
327+
</goals>
328+
</execution>
329+
</executions>
330+
</plugin>
247331
</plugins>
248332
</build>
249333

@@ -303,6 +387,41 @@
303387
</build>
304388
</profile>
305389

390+
<profile>
391+
<!-- extra tasks only meant to be executed by CI server -->
392+
<id>ci</id>
393+
<properties>
394+
<gcf.skip>true</gcf.skip>
395+
</properties>
396+
397+
<build>
398+
<plugins>
399+
<plugin>
400+
<groupId>org.codehaus.mojo</groupId>
401+
<artifactId>exec-maven-plugin</artifactId>
402+
<version>3.0.0</version>
403+
<executions>
404+
<execution>
405+
<goals>
406+
<goal>exec</goal>
407+
</goals>
408+
<phase>post-integration-test</phase>
409+
<configuration>
410+
<!-- print logs from cloud-compilation service, helpful when troubleshooting -->
411+
<executable>docker</executable>
412+
<arguments>
413+
<argument>logs</argument>
414+
<argument>flink-jar-runner-jobmanager-1</argument>
415+
</arguments>
416+
</configuration>
417+
</execution>
418+
</executions>
419+
</plugin>
420+
421+
</plugins>
422+
</build>
423+
424+
</profile>
306425
<profile>
307426
<!-- just compile, skip all other checks -->
308427
<id>quickbuild</id>

0 commit comments

Comments
 (0)