test(mqtt): fix unpredictable behavior #241
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: build | |
on: | |
push: | |
branches: [ develop, master ] | |
pull_request: | |
env: | |
FORCE_COLOR: true | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17.5' | |
- name: Install gitlint | |
run: | | |
pip install gitlint | |
gitlint --version | |
- name: Run gitlint | |
run: gitlint | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
- name: Run vet | |
run: make vet | |
complexity-analysis: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17.5' | |
- name: Install gocyclo | |
run: go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
- name: Calculate cyclomatic complexities | |
run: make complexity | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17.5' | |
- name: Build application | |
run: make build | |
unit-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17.5' | |
- name: Run tests | |
run: make coverage | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
system-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17.5' | |
- name: Install dependencies | |
run: go install gotest.tools/gotestsum@latest | |
- name: Run system tests | |
run: make system |