Skip to content

Commit 8a67d84

Browse files
authored
[Build] Build examples in ci (#2591)
1 parent a97f2a7 commit 8a67d84

File tree

5 files changed

+60
-45
lines changed

5 files changed

+60
-45
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ ifndef CCK_VERSION
2323
@echo -e "\033[0;31mCCK_VERSION is not defined. Can't update CCK :-(\033[0m"
2424
exit 1
2525
endif
26-
git clone --branch compatibility-kit/v$$CCK_VERSION [email protected]:cucumber/cucumber.git target/cucumber
27-
rm -rf compatibility/src/test/resources/*
28-
cp -r target/cucumber/compatibility-kit/javascript/features compatibility/src/test/resources
29-
rm -rf target/cucumber
26+
git clone --branch v$$CCK_VERSION [email protected]:cucumber/compatibility-kit.git target/compatibility-kit
27+
cd target/compatibility-kit/devkit && npm install && npm run generate-ndjson
28+
rm -rf compatibility/src/test/resources/features/*
29+
cp -r target/compatibility-kit/devkit/samples/* compatibility/src/test/resources/features
30+
rm -rf target/compatibility-kit
3031
.PHONY: update-cck
3132

3233
update-dependency-versions:
@@ -56,7 +57,7 @@ update-changelog:
5657
.release-in-docker: .configure-cukebot-in-docker default update-changelog .commit-and-push-changelog
5758
mvn --batch-mode release:clean release:prepare -DautoVersionSubmodules=true -Darguments="-DskipTests=true -DskipITs=true -Darchetype.test.skip=true"
5859
git checkout "v$(NEW_VERSION)"
59-
mvn deploy -P-examples -P-compatibility -Psign-source-javadoc -DskipTests=true -DskipITs=true -Darchetype.test.skip=true
60+
mvn deploy -P-build-in-ci -Psign-source-javadoc -DskipTests=true -DskipITs=true -Darchetype.test.skip=true
6061
git checkout $(CURRENT_BRANCH)
6162
git fetch
6263
.PHONY: .release-in-docker

compatibility/pom.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<parent>
45
<artifactId>cucumber-jvm</artifactId>
56
<groupId>io.cucumber</groupId>
@@ -12,6 +13,7 @@
1213

1314
<properties>
1415
<hamcrest.version>2.2</hamcrest.version>
16+
<jackson-databind.version>2.13.3</jackson-databind.version>
1517
<junit-jupiter.version>5.9.0</junit-jupiter.version>
1618
</properties>
1719

@@ -31,6 +33,13 @@
3133
<type>pom</type>
3234
<scope>import</scope>
3335
</dependency>
36+
<dependency>
37+
<groupId>com.fasterxml.jackson</groupId>
38+
<artifactId>jackson-bom</artifactId>
39+
<version>${jackson-databind.version}</version>
40+
<type>pom</type>
41+
<scope>import</scope>
42+
</dependency>
3443
</dependencies>
3544
</dependencyManagement>
3645

@@ -51,6 +60,12 @@
5160
<artifactId>junit-jupiter</artifactId>
5261
<scope>test</scope>
5362
</dependency>
63+
<dependency>
64+
<groupId>com.fasterxml.jackson.core</groupId>
65+
<artifactId>jackson-databind</artifactId>
66+
<version>${jackson-databind.version}</version>
67+
<scope>test</scope>
68+
</dependency>
5469
</dependencies>
5570

5671
<build>

compatibility/src/test/java/io/cucumber/compatibility/AComparableMessage.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package io.cucumber.compatibility;
22

3-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.JsonNode;
4-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.node.ArrayNode;
5-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.node.BooleanNode;
6-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.node.NumericNode;
7-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.node.ObjectNode;
8-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.node.TextNode;
3+
import com.fasterxml.jackson.databind.JsonNode;
4+
import com.fasterxml.jackson.databind.node.ArrayNode;
5+
import com.fasterxml.jackson.databind.node.BooleanNode;
6+
import com.fasterxml.jackson.databind.node.NumericNode;
7+
import com.fasterxml.jackson.databind.node.ObjectNode;
8+
import com.fasterxml.jackson.databind.node.TextNode;
99
import org.hamcrest.CoreMatchers;
1010
import org.hamcrest.Description;
1111
import org.hamcrest.Matcher;

compatibility/src/test/java/io/cucumber/compatibility/CompatibilityTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package io.cucumber.compatibility;
22

3+
import com.fasterxml.jackson.core.JsonProcessingException;
4+
import com.fasterxml.jackson.databind.DeserializationFeature;
5+
import com.fasterxml.jackson.databind.JsonNode;
6+
import com.fasterxml.jackson.databind.ObjectMapper;
37
import io.cucumber.core.options.RuntimeOptionsBuilder;
48
import io.cucumber.core.plugin.HtmlFormatter;
59
import io.cucumber.core.plugin.JsonFormatter;
610
import io.cucumber.core.plugin.MessageFormatter;
711
import io.cucumber.core.runtime.Runtime;
8-
import io.cucumber.messages.internal.com.fasterxml.jackson.core.JsonProcessingException;
9-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.DeserializationFeature;
10-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.JsonNode;
11-
import io.cucumber.messages.internal.com.fasterxml.jackson.databind.ObjectMapper;
1212
import org.hamcrest.Matcher;
1313
import org.junit.jupiter.params.ParameterizedTest;
1414
import org.junit.jupiter.params.provider.MethodSource;

pom.xml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,14 @@
6262

6363
<profiles>
6464
<profile>
65-
<id>examples</id>
65+
<id>build-local</id>
6666
<activation>
6767
<activeByDefault>true</activeByDefault>
6868
</activation>
6969
<modules>
7070
<module>examples</module>
71-
</modules>
72-
</profile>
73-
<profile>
74-
<id>compatibility</id>
75-
<activation>
76-
<activeByDefault>true</activeByDefault>
77-
</activation>
78-
<modules>
7971
<module>compatibility</module>
8072
</modules>
81-
</profile>
82-
83-
<profile>
84-
<id>spotless-apply</id>
85-
<activation>
86-
<property>
87-
<name>!CI</name>
88-
</property>
89-
</activation>
9073
<build>
9174
<pluginManagement>
9275
<plugins>
@@ -104,22 +87,26 @@
10487
</execution>
10588
</executions>
10689
</plugin>
107-
<!-- Need the 3.0.0 release for Junit5 + Before/After hooks -->
108-
<plugin>
109-
<groupId>org.apache.maven.plugins</groupId>
110-
<artifactId>maven-surefire-plugin</artifactId>
111-
<version>3.0.0-M7</version>
112-
</plugin>
113-
<plugin>
114-
<groupId>org.apache.maven.plugins</groupId>
115-
<artifactId>maven-failsafe-plugin</artifactId>
116-
<version>3.0.0-M7</version>
117-
</plugin>
90+
11891
</plugins>
11992
</pluginManagement>
12093
</build>
12194
</profile>
12295

96+
<profile>
97+
<id>build-in-ci</id>
98+
<activation>
99+
<property>
100+
<name>CI</name>
101+
<value>true</value>
102+
</property>
103+
</activation>
104+
<modules>
105+
<module>examples</module>
106+
<module>compatibility</module>
107+
</modules>
108+
</profile>
109+
123110
<profile>
124111
<id>check-semantic-version</id>
125112
<build>
@@ -143,6 +130,18 @@
143130

144131
<build>
145132
<plugins>
133+
<!-- Need the 3.0.0+ release for Junit5 + Before/After hooks -->
134+
<plugin>
135+
<groupId>org.apache.maven.plugins</groupId>
136+
<artifactId>maven-surefire-plugin</artifactId>
137+
<version>3.0.0-M7</version>
138+
</plugin>
139+
<plugin>
140+
<groupId>org.apache.maven.plugins</groupId>
141+
<artifactId>maven-failsafe-plugin</artifactId>
142+
<version>3.0.0-M7</version>
143+
</plugin>
144+
146145
<plugin>
147146
<groupId>org.apache.maven.plugins</groupId>
148147
<artifactId>maven-enforcer-plugin</artifactId>

0 commit comments

Comments
 (0)