Skip to content

Commit b7d3ed2

Browse files
committed
Tests and integration tests should be executable from both local machines and CI using just 'mvn verify'
1 parent 0a81fc3 commit b7d3ed2

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

pom.xml

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@
9696
</resource>
9797
</resources>
9898

99+
<pluginManagement>
100+
<plugins>
101+
<groupId>org.codehaus.mojo</groupId>
102+
<artifactId>exec-maven-plugin</artifactId>
103+
<version>3.0.0</version>
104+
</plugins>
105+
</pluginManagement>
106+
99107
<plugins>
100108
<plugin>
101109
<groupId>com.github.eirslett</groupId>
@@ -139,12 +147,13 @@
139147
</goals>
140148
<phase>compile</phase>
141149
</execution>
150+
<!-- Mocha is used for integration tests of xqsuite -->
142151
<execution>
143152
<id>mocha tests</id>
144153
<goals>
145154
<goal>npm</goal>
146155
</goals>
147-
<phase>test</phase>
156+
<phase>integration-test</phase>
148157
<configuration>
149158
<arguments>test</arguments>
150159
</configuration>
@@ -238,6 +247,67 @@
238247
</execution>
239248
</executions>
240249
</plugin>
250+
<!-- start up Server in Docker for integration-test -->
251+
<plugin>
252+
<groupId>io.fabric8</groupId>
253+
<artifactId>docker-maven-plugin</artifactId>
254+
<version>0.35.0</version>
255+
<configuration>
256+
<verbose>true</verbose>
257+
<images>
258+
<image>
259+
<alias>existdb-docs-tests</alias>
260+
<name>existdb/existdb:latest</name>
261+
<run>
262+
<ports>
263+
<port>8080:8080</port>
264+
</ports>
265+
<wait>
266+
<log>Server has started, listening on</log>
267+
<time>120000</time>
268+
</wait>
269+
</run>
270+
</image>
271+
</images>
272+
</configuration>
273+
<executions>
274+
<execution>
275+
<id>docker-it-start</id>
276+
<phase>pre-integration-test</phase>
277+
<goals>
278+
<goal>start</goal>
279+
</goals>
280+
</execution>
281+
<execution>
282+
<id>docker-it-stop</id>
283+
<phase>post-integration-test</phase>
284+
<goals>
285+
<goal>stop</goal>
286+
</goals>
287+
</execution>
288+
</executions>
289+
</plugin>
290+
<!-- Cypress is used for integration tests -->
291+
<plugin>
292+
<groupId>org.codehaus.mojo</groupId>
293+
<artifactId>exec-maven-plugin</artifactId>
294+
<executions>
295+
<execution>
296+
<phase>integration-test</phase>
297+
<goals>
298+
<goal>exec</goal>
299+
</goals>
300+
<configuration>
301+
<executable>npm</executable>
302+
<arguments>
303+
<argument>run</argument>
304+
<argument>cypress</argument>
305+
<argument>--</argument>
306+
</arguments>
307+
</configuration>
308+
</execution>
309+
</executions>
310+
</plugin>
241311
<plugin>
242312
<groupId>org.apache.maven.plugins</groupId>
243313
<artifactId>maven-gpg-plugin</artifactId>
@@ -272,4 +342,5 @@
272342
<url>http://clojars.org/repo</url>
273343
</pluginRepository>
274344
</pluginRepositories>
345+
275346
</project>

0 commit comments

Comments
 (0)