Skip to content

OpenTelemetry Metrics for Middlewares #293

OpenTelemetry Metrics for Middlewares

OpenTelemetry Metrics for Middlewares #293

Workflow file for this run

name: build
on:
push:
tags: [v\d+.\d+.\d+]
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container: golang:1.21
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
services:
mqtt:
image: emqx/emqx:latest
ports:
- 1883:1883
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add .git to safe paths
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Go mod cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Tools bin cache
uses: actions/cache@v3
with:
path: .bin
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('Makefile') }}
- name: Install jq
uses: dcarbone/[email protected]
- name: Test
run: make ci
env:
BROKER_ADDRESS: 'mqtt:1883'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true