-
Notifications
You must be signed in to change notification settings - Fork 137
70 lines (66 loc) · 2.92 KB
/
native-images-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# This workflow will build all of Hono's components, run unit tests and create
# Docker images. Finally, the integration tests are run.
# The job uses a matrix for the distinct device registry implementations. Thus,
# for each registry implementation, the workflow is run on a separate VM.
name: Build native images and run integration tests
on:
schedule:
# run three times a day (UTC)
- cron: '23 3,10,14 * * *'
# enable running the workflow manually
workflow_dispatch:
jobs:
build-and-run-tests:
runs-on: ubuntu-latest
name: "Run integration tests with native images"
steps:
- uses: actions/checkout@v3
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.6
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: "maven"
- name: "Build native images"
run: |
mvn install -B -e -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dquarkus.native.remote-container-build=false -Dquarkus.native.container-build=true \
-Pbuild-native-image,metrics-prometheus -am \
-pl :hono-service-auth,:hono-service-command-router,:hono-service-device-registry-mongodb,\
:hono-adapter-mqtt,:hono-adapter-amqp,:hono-adapter-coap,:hono-adapter-http,:hono-adapter-lora,\
:hono-tests
- name: "Run integration tests with Mongo DB and Kafka"
run: |
mvn verify -pl :hono-tests -B -e -DCI=$CI \
-Dhono.components.type=quarkus-native -Dhono.deviceregistry.type=mongodb \
-Dhono.messaging-infra.type=kafka -Dhono.commandrouting.cache=server \
-Prun-tests,jaeger
- name: "Build JDBC registry image"
run: |
mvn install -B -e -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Pbuild-docker-image,metrics-prometheus -am -pl :hono-service-device-registry-jdbc
- name: "Run integration tests with Sandbox-like configuration"
run: |
mvn verify -pl :hono-tests -B -e -DCI=$CI \
-Dhono.components.type=quarkus-native -Dhono.deviceregistry.type=file \
-Dhono.messaging-infra.type=amqp -Dhono.commandrouting.cache=embedded \
-Prun-tests
- name: "Create CLI native executable"
run: |
mvn install -B -e -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Pbuild-cli-native-executable -am -pl :hono-cli