-
Notifications
You must be signed in to change notification settings - Fork 137
79 lines (74 loc) · 3.1 KB
/
ci.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
71
72
73
74
75
76
77
78
79
# Copyright (c) 2020, 2022 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 and run integration tests
on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
device-registry-name: [file,jdbc,mongodb-4.4,mongodb-5.0,mongodb-6.0]
include:
# Use Quarkus JVM images: file registry, AMQP messaging, Command Router with embedded cache
- device-registry-name: file
device-registry: file
commandrouting-cache: embedded
messaging-type: amqp
mongodb-image-name: mongo:4.4
# Use Quarkus JVM images: jdbc registry, Kafka messaging, Command Router with embedded cache
- device-registry-name: jdbc
device-registry: jdbc
commandrouting-cache: embedded
messaging-type: kafka
mongodb-image-name: mongo:4.4
# Use Quarkus JVM images: mongodb registry Kafka messaging, Command Router with data grid
- device-registry-name: mongodb-4.4
device-registry: mongodb
commandrouting-cache: server
messaging-type: kafka
mongodb-image-name: mongo:4.4
- device-registry-name: mongodb-5.0
device-registry: mongodb
commandrouting-cache: server
messaging-type: kafka
mongodb-image-name: mongo:5.0
- device-registry-name: mongodb-6.0
device-registry: mongodb
commandrouting-cache: server
messaging-type: kafka
mongodb-image-name: mongo:6.0
name: "Use ${{ matrix.device-registry-name }} registry, ${{ matrix.messaging-type }} messaging with ${{ matrix.commandrouting-cache }} cache"
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 all components (incl. unit tests) and run integration tests
run: |
mvn clean verify -B -e -DcreateJavadoc=true -DCI=$CI \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dhono.deviceregistry.type=${{ matrix.device-registry }} \
-Dhono.messaging-infra.type=${{ matrix.messaging-type }} \
-Dhono.commandrouting.cache=${{ matrix.commandrouting-cache }} \
-Dmongodb-image.name=${{ matrix.mongodb-image-name }} \
-Pbuild-docker-image,jaeger,run-tests