Skip to content

Linter added

Linter added #21

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'
- 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.54.2
env:
GOPATH: ${{ runner.tool_cache }}/go
- name: Run golangci-lint
run: golangci-lint run ./...
- name: Run Tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.txt
fail_ci_if_error: true