Update module github.com/gosnmp/gosnmp to v1.36.1 #355
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install libsnmp-dev | |
- name: Build | |
run: go build ./cmd/snmp-proxy | |
build-no-netsnmp: | |
name: Build without netsnmp | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Build | |
run: go build -tags=nonetsnmp ./cmd/snmp-proxy | |
test: | |
name: Test | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install libsnmp-dev python3-pip snmp-mibs-downloader | |
- name: Install snmpsim | |
run: sudo pip3 install snmpsim | |
- name: Run tests | |
run: make test | |
test-no-netsnmp: | |
name: Test without netsnmp | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install python3-pip | |
- name: Install snmpsim | |
run: sudo pip3 install snmpsim | |
- name: Run tests | |
run: GO_TEST_FLAGS=-tags=nonetsnmp make test | |
coverage: | |
name: Code Coverage | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install libsnmp-dev python3-pip snmp-mibs-downloader | |
- name: Install snmpsim | |
run: sudo pip3 install snmpsim | |
- name: Download go-acc | |
run: go install github.com/ory/go-acc@latest | |
- name: Generate Code Coverage | |
run: GO_ACC="$(go env GOPATH)/bin/go-acc" make coverage | |
- name: Send coverage | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.cov | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install libsnmp-dev | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 |