Skip to content

Add golangci-lint configuration and fix linting issues #126

Add golangci-lint configuration and fix linting issues

Add golangci-lint configuration and fix linting issues #126

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@master
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- name: Run golangci-lint
run: golangci-lint run
- name: run tests
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Publish coverage
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt