Skip to content

Commit dce1798

Browse files
add github action services
1 parent d72c33d commit dce1798

File tree

2 files changed

+113
-86
lines changed

2 files changed

+113
-86
lines changed

.github/workflows/ci-actions.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ jobs:
3030
contains(github.event.changes.title.from, '[wip]') \
3131
) \
3232
)"
33+
34+
services:
35+
activemq-artemis:
36+
image: vromero/activemq-artemis:2.9.0-alpine
37+
env:
38+
ARTEMIS_USERNAME: quarkus
39+
ARTEMIS_PASSWORD: quarkus
40+
ports:
41+
- 127.0.0.1:8161:8161
42+
- 127.0.0.1:61616:61616
43+
minio:
44+
image: minio/minio
45+
env:
46+
MINIO_ACCESS_KEY: BQA2GEXO711FVBVXDWKM
47+
MINIO_SECRET_KEY: uvgz3LCwWM3e400cDkQIH/y1Y4xgU4iV91CwFSPC
48+
ports:
49+
- 127.0.0.1:9000:9000
50+
3351
steps:
3452
- uses: actions/checkout@v2
3553
- uses: n1hility/cancel-previous-runs@v2
@@ -43,10 +61,10 @@ jobs:
4361
java-version: 11
4462
- name: Build with Maven and Coverage
4563
if: github.event_name == 'pull_request'
46-
run: mvn verify -P coverage
64+
run: mvn verify -P '!services,coverage'
4765
- name: Build with Maven and Coverage/Sonar
4866
if: github.event_name != 'pull_request'
49-
run: mvn verify -P coverage,sonar
67+
run: mvn verify -P '!services,coverage,sonar'
5068
env:
5169
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5270
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

api/pom.xml

Lines changed: 93 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -135,94 +135,103 @@
135135
</execution>
136136
</executions>
137137
</plugin>
138-
139-
<plugin>
140-
<!-- Automatically start Artemis MQ for integration testing - requires Docker -->
141-
<groupId>io.fabric8</groupId>
142-
<artifactId>docker-maven-plugin</artifactId>
143-
<version>${docker-plugin.version}</version>
144-
<configuration>
145-
<skip>${skipTests}</skip>
146-
<images>
147-
<image>
148-
<name>vromero/activemq-artemis:2.9.0-alpine</name>
149-
<alias>activemq-artemis</alias>
150-
<run>
151-
<env>
152-
<ARTEMIS_USERNAME>quarkus</ARTEMIS_USERNAME>
153-
<ARTEMIS_PASSWORD>quarkus</ARTEMIS_PASSWORD>
154-
</env>
155-
<ports>
156-
<port>8161:8161</port>
157-
<port>61616:61616</port>
158-
</ports>
159-
<log>
160-
<prefix>ArtemisMQ: </prefix>
161-
<date>default</date>
162-
<color>cyan</color>
163-
</log>
164-
<wait>
165-
<tcp>
166-
<mode>mapped</mode>
138+
</plugins>
139+
</build>
140+
<profiles>
141+
<profile>
142+
<id>services</id>
143+
<activation>
144+
<activeByDefault>true</activeByDefault>
145+
</activation>
146+
<build>
147+
<plugins>
148+
<plugin>
149+
<!-- Automatically start Artemis MQ for integration testing - requires Docker -->
150+
<groupId>io.fabric8</groupId>
151+
<artifactId>docker-maven-plugin</artifactId>
152+
<version>${docker-plugin.version}</version>
153+
<configuration>
154+
<skip>${skipTests}</skip>
155+
<images>
156+
<image>
157+
<name>vromero/activemq-artemis:2.9.0-alpine</name>
158+
<alias>activemq-artemis</alias>
159+
<run>
160+
<env>
161+
<ARTEMIS_USERNAME>quarkus</ARTEMIS_USERNAME>
162+
<ARTEMIS_PASSWORD>quarkus</ARTEMIS_PASSWORD>
163+
</env>
167164
<ports>
168-
<port>8161</port>
165+
<port>8161:8161</port>
166+
<port>61616:61616</port>
169167
</ports>
170-
</tcp>
171-
<time>10000</time>
172-
</wait>
173-
</run>
174-
</image>
175-
<image>
176-
<name>minio/minio</name>
177-
<alias>minio</alias>
178-
<run>
179-
<env>
180-
<MINIO_ACCESS_KEY>BQA2GEXO711FVBVXDWKM</MINIO_ACCESS_KEY>
181-
<MINIO_SECRET_KEY>uvgz3LCwWM3e400cDkQIH/y1Y4xgU4iV91CwFSPC</MINIO_SECRET_KEY>
182-
</env>
183-
<ports>
184-
<port>9000:9000</port>
185-
</ports>
186-
<log>
187-
<prefix>S3: </prefix>
188-
<date>default</date>
189-
<color>magenta</color>
190-
</log>
191-
<wait>
192-
<tcp>
193-
<mode>mapped</mode>
168+
<log>
169+
<prefix>ArtemisMQ: </prefix>
170+
<date>default</date>
171+
<color>cyan</color>
172+
</log>
173+
<wait>
174+
<tcp>
175+
<mode>mapped</mode>
176+
<ports>
177+
<port>8161</port>
178+
</ports>
179+
</tcp>
180+
<time>10000</time>
181+
</wait>
182+
</run>
183+
</image>
184+
<image>
185+
<name>minio/minio</name>
186+
<alias>minio</alias>
187+
<run>
188+
<env>
189+
<MINIO_ACCESS_KEY>BQA2GEXO711FVBVXDWKM</MINIO_ACCESS_KEY>
190+
<MINIO_SECRET_KEY>uvgz3LCwWM3e400cDkQIH/y1Y4xgU4iV91CwFSPC</MINIO_SECRET_KEY>
191+
</env>
194192
<ports>
195-
<port>9000</port>
193+
<port>9000:9000</port>
196194
</ports>
197-
</tcp>
198-
<time>10000</time>
199-
</wait>
200-
<cmd>server /data</cmd>
201-
</run>
202-
</image>
203-
</images>
204-
</configuration>
205-
<executions>
206-
<execution>
207-
<id>docker-start</id>
208-
<phase>test-compile</phase>
209-
<goals>
210-
<goal>stop</goal>
211-
<goal>start</goal>
212-
</goals>
213-
</execution>
214-
<execution>
215-
<id>docker-stop</id>
216-
<phase>post-integration-test</phase>
217-
<goals>
218-
<goal>stop</goal>
219-
</goals>
220-
</execution>
221-
</executions>
222-
</plugin>
223-
</plugins>
224-
</build>
225-
<profiles>
195+
<log>
196+
<prefix>S3: </prefix>
197+
<date>default</date>
198+
<color>magenta</color>
199+
</log>
200+
<wait>
201+
<tcp>
202+
<mode>mapped</mode>
203+
<ports>
204+
<port>9000</port>
205+
</ports>
206+
</tcp>
207+
<time>10000</time>
208+
</wait>
209+
<cmd>server /data</cmd>
210+
</run>
211+
</image>
212+
</images>
213+
</configuration>
214+
<executions>
215+
<execution>
216+
<id>docker-start</id>
217+
<phase>test-compile</phase>
218+
<goals>
219+
<goal>stop</goal>
220+
<goal>start</goal>
221+
</goals>
222+
</execution>
223+
<execution>
224+
<id>docker-stop</id>
225+
<phase>post-integration-test</phase>
226+
<goals>
227+
<goal>stop</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
</plugin>
232+
</plugins>
233+
</build>
234+
</profile>
226235
<profile>
227236
<id>native</id>
228237
<activation>

0 commit comments

Comments
 (0)