Files
supermq/.github/workflows/build.yaml
T
Dušan Borovčanin 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
NOISSUE - Make CI scripts run in parallel (#3269)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2025-12-02 22:58:23 +01:00

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