-
Notifications
You must be signed in to change notification settings - Fork 174
41 lines (40 loc) · 1.4 KB
/
test.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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
MOSQUITTO_VERSION_1: 1.6.15
MOSQUITTO_VERSION_2: 2.0.18
DOCKERFILE_MOSQUITTO_VERSION: 1.6.14
DOCKERHUB_REPO: mosquitto-go-auth
jobs:
mosq_1:
name: Test with Mosquitto version 1.x
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set Mosquitto version
run: sed -i 's/ARG MOSQUITTO_VERSION=${{ env.DOCKERFILE_MOSQUITTO_VERSION }}/ARG MOSQUITTO_VERSION=${{ env.MOSQUITTO_VERSION_1 }}/' Dockerfile.runtest
- name: Test
run: |
docker build -t mosquitto-go-auth.test -f Dockerfile.runtest .
docker run --rm mosquitto-go-auth.test ./run-test-in-docker.sh
mosq_2:
name: Test with Mosquitto version 2.x
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set Mosquitto version
run: sed -i 's/ARG MOSQUITTO_VERSION=${{ env.DOCKERFILE_MOSQUITTO_VERSION }}/ARG MOSQUITTO_VERSION=${{ env.MOSQUITTO_VERSION_2 }}/' Dockerfile.runtest
- name: Test
run: |
docker build -t mosquitto-go-auth.test -f Dockerfile.runtest .
docker run --rm mosquitto-go-auth.test ./run-test-in-docker.sh