mirror of
https://github.com/mdlayher/apcupsd_exporter.git
synced 2025-02-18 00:31:49 +01:00
39 lines
700 B
YAML
39 lines
700 B
YAML
name: Static Analysis
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.17]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install staticcheck
|
|
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
|
|
- name: Print staticcheck version
|
|
run: staticcheck -version
|
|
|
|
- name: Run staticcheck
|
|
run: staticcheck ./...
|
|
|
|
- name: Run go vet
|
|
run: go vet ./...
|