mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 06:10:19 +00:00
0df8e8451c
Property Based Tests / api-test (push) Has been cancelled
Continuous Delivery / Test (push) Has been cancelled
Continuous Delivery / Compile Check (map[env:SMQ_ES_TYPE=es_redis name:redis target:mqtt]) (push) Has been cancelled
Continuous Delivery / Compile Check (map[env:SMQ_MESSAGE_BROKER_TYPE=msg_rabbitmq name:rabbitmq target:mqtt]) (push) Has been cancelled
Check the consistency of generated files / check-generated-files (push) Has been cancelled
Check License Header / check-license (push) Has been cancelled
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
CI Pipeline / Lint (push) Has been cancelled
CI Pipeline / Detect Changes (push) Has been cancelled
Continuous Delivery / Build and Push (push) Has been cancelled
CI Pipeline / Build (push) Has been cancelled
CI Pipeline / Test ${{ matrix.module }} (push) Has been cancelled
CI Pipeline / Upload Coverage (push) Has been cancelled
Signed-off-by: dusan <borovcanindusan1@gmail.com>
121 lines
2.8 KiB
YAML
121 lines
2.8 KiB
YAML
# Copyright (c) Abstract Machines
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Continuous Delivery
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.25.x
|
|
cache-dependency-path: "go.sum"
|
|
|
|
- name: Set GOBIN
|
|
run: echo "GOBIN=$HOME/.local/bin" >> $GITHUB_ENV
|
|
|
|
- name: Add GOBIN to PATH
|
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
- name: Run tests
|
|
run: |
|
|
make test
|
|
|
|
- name: Upload coverage
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV }}
|
|
files: ./coverage/*.out
|
|
verbose: true
|
|
|
|
compile-check:
|
|
name: Compile Check
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
variant:
|
|
- name: rabbitmq
|
|
env: SMQ_MESSAGE_BROKER_TYPE=msg_rabbitmq
|
|
target: mqtt
|
|
- name: redis
|
|
env: SMQ_ES_TYPE=es_redis
|
|
target: mqtt
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.25.x
|
|
cache-dependency-path: "go.sum"
|
|
|
|
- name: Compile check for ${{ matrix.variant.name }}
|
|
run: |
|
|
${{ matrix.variant.env }} make ${{ matrix.variant.target }}
|
|
|
|
build-and-push:
|
|
name: Build and Push
|
|
runs-on: ubuntu-latest
|
|
needs: [test, compile-check]
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.25.x
|
|
cache-dependency-path: "go.sum"
|
|
|
|
- name: Set up Docker Build
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: docker.io
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Build and push Docker images
|
|
run: |
|
|
make latest -j $(nproc)
|
|
|
|
- name: Trigger Helm Chart Deployment
|
|
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
uses: peter-evans/repository-dispatch@v4
|
|
with:
|
|
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
|
|
repository: absmach/amdm
|
|
event-type: deploy-latest-smq-images
|