Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Configure Cypress to not record on local dev machines, but to record …
…under CI
  • Loading branch information
adamretter committed Apr 8, 2021
commit 3b49f4f77438ed01ab7d9bc6ab07ba99e3bf19e1
102 changes: 75 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -289,27 +289,6 @@
</execution>
</executions>
</plugin>
<!-- Cypress is used for integration tests -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>cypress</argument>
<argument>--</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -331,12 +310,81 @@
</plugins>
</build>

<repositories>
<repository>
<id>exist</id>
<url>https://raw.github.com/eXist-db/mvn-repo/master/</url>
</repository>
</repositories>
<!--
Cypress is used for integration tests

First profile enables to run Cypress without record (cypress.io) support.
Second profile enables to run Cypress with record support, e.g. for CI.
-->
<profiles>
<profile>
<id>cypress-without-record</id>
<activation>
<property>
<name>env.CI</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>cypress</argument>
<argument>--</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>cypress-with-record</id>
<activation>
<property>
<name>env.CI</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>cypress</argument>
<argument>--</argument>
<argument>--record</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<pluginRepositories>
<pluginRepository>
Expand Down