Skip to content

update: staticcheck findings, pipeline #4

update: staticcheck findings, pipeline

update: staticcheck findings, pipeline #4

Workflow file for this run

name: CI
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24
- name: Install dependencies
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/lint/golint
go mod download
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Run staticcheck
run: |
echo "::group::Running staticcheck"
staticcheck ./... || true
echo "::endgroup::"
echo "::group::Running lint"
golint ./... || true
echo "::endgroup::"
- name: Build
run: GOOS=linux go build -o dist/${BINARY_NAME} ipvsctl.go
- name: Run tests
run: |
go test -v -coverprofile=cover.out ./...
go tool -v cover -func=cover.out