feat: add custom metrics names #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build_n_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20' | |
- name: Install xk6 | |
run: go install go.k6.io/xk6/cmd/xk6@latest | |
- name: Run mqtt broker | |
run: docker run -p 1883:1883 -e "DOCKER_VERNEMQ_ACCEPT_EULA=yes" -e DOCKER_VERNEMQ_ALLOW_ANONYMOUS=on --name vernemq -d vernemq/vernemq | |
- name: Go tests | |
run: go test -race ./... | |
- name: Test from source | |
run: xk6 build --with github.com/pmalhaire/xk6-mqtt=. && ./k6 run --vus 50 --duration 10s examples/test.js | |
- name: Test tls | |
run: docker run -d -v $PWD/docker_conf/mosquitto:/conf --rm --name mosquitto_tls -p 8883:8883 eclipse-mosquitto mosquitto -c /conf/mosquitto-tls.conf | |
- name: Test tls from source | |
run: xk6 run ./examples/test_ssl.js -i 1 | |
- name: Run influx | |
run: docker run --rm --name influx -d -p 8086:8086 influxdb:1.8-alpine | |
- name: Test influx | |
run: K6_OUT=influxdb=localhost:8086 xk6 run --vus 50 --duration 10s examples/test.js | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20' | |
- uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 |