Skip to content

Add golangci -lint, fix error of code #953

Add golangci -lint, fix error of code

Add golangci -lint, fix error of code #953

Workflow file for this run

name: Lint and unit tests
on:
push:
branches:
- '**'
tags:
- 'v*'
pull_request:
branches:
- master
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@master
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
tests:
name: Tests
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@master
with:
go-version: 1.21
- run: |
GOPROXY=direct,https://proxy.golang.org GOSUMDB=off GO111MODULE=on go test -v ./...