Build native images and run integration tests #1805
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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.8 | |
- 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 |