Skip to content

Commit e14fe5b

Browse files
authored
Add GitHub Actions to build and test the extension (#216)
1 parent bfa55cd commit e14fe5b

File tree

5 files changed

+68
-7
lines changed

5 files changed

+68
-7
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build & test with native-image
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
jobs:
7+
build:
8+
if: github.event.pull_request.merged == true
9+
runs-on: ubuntu-latest
10+
name: Java ${{ matrix.java_version }}
11+
strategy:
12+
matrix:
13+
java_version:
14+
- '11'
15+
# - '17'
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: graalvm/setup-graalvm@v1
19+
with:
20+
version: '22.2.0'
21+
java-version: ${{ matrix.java_version }}
22+
components: 'native-image'
23+
github-token: ${{ secrets.GB_TOKEN }}
24+
- name: Build & test with native-image
25+
run: |
26+
echo "GRAALVM_HOME: $GRAALVM_HOME"
27+
echo "JAVA_HOME: $JAVA_HOME"
28+
java --version
29+
gu --version
30+
native-image --version
31+
mvn verify -Prelease -Dnative -Dgpg.skip

.github/workflows/quarkus-build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build & test
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
name: Java ${{ matrix.java_version }}
7+
strategy:
8+
matrix:
9+
java_version:
10+
- '11'
11+
- '17'
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-java@v3
15+
with:
16+
distribution: 'adopt-hotspot'
17+
java-version: ${{ matrix.java_version }}
18+
cache: 'maven'
19+
- name: Build & test
20+
run: |
21+
echo "JAVA_HOME: $JAVA_HOME"
22+
java --version
23+
mvn verify

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
<pluginManagement>
5555
<plugins>
5656
<plugin>
57-
<groupId>com.coveo</groupId>
57+
<groupId>com.spotify.fmt</groupId>
5858
<artifactId>fmt-maven-plugin</artifactId>
59-
<version>2.13</version>
59+
<version>2.19</version>
6060
</plugin>
6161
<plugin>
6262
<groupId>au.com.acegi</groupId>
@@ -144,7 +144,7 @@
144144
</pluginManagement>
145145
<plugins>
146146
<plugin>
147-
<groupId>com.coveo</groupId>
147+
<groupId>com.spotify.fmt</groupId>
148148
<artifactId>fmt-maven-plugin</artifactId>
149149
<executions>
150150
<execution>

quickstart/pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<assertj.version>3.23.1</assertj.version>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35+
<failsafe.testGroups>!native</failsafe.testGroups>
3536
</properties>
3637
<dependencyManagement>
3738
<dependencies>
@@ -113,9 +114,9 @@
113114
<build>
114115
<plugins>
115116
<plugin>
116-
<groupId>com.coveo</groupId>
117+
<groupId>com.spotify.fmt</groupId>
117118
<artifactId>fmt-maven-plugin</artifactId>
118-
<version>2.13</version>
119+
<version>2.19</version>
119120
<executions>
120121
<execution>
121122
<goals>
@@ -180,8 +181,10 @@
180181
</execution>
181182
</executions>
182183
<configuration>
184+
<groups>${failsafe.testGroups}</groups>
183185
<systemProperties>
184186
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
187+
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
185188
</systemProperties>
186189
</configuration>
187190
</plugin>

quickstart/src/main/java/com/datastax/oss/quarkus/demo/Fruit.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ public Fruit(String name, String description) {
4040
this.description = description;
4141
}
4242

43-
/** @return The fruit name. */
43+
/**
44+
* @return The fruit name.
45+
*/
4446
public String getName() {
4547
return name;
4648
}
4749

48-
/** @return The fruit description. */
50+
/**
51+
* @return The fruit description.
52+
*/
4953
public String getDescription() {
5054
return description;
5155
}

0 commit comments

Comments
 (0)