diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..8ea3caa --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,21 @@ +on: [push, pull_request] +name: linter + +jobs: + lint: + strategy: + matrix: + go-version: [1.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.31 + + - name: Run go fmt + run: diff -u <(echo -n) <(gofmt -d -s .) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8dd2e1a..f3e0e6b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,13 +24,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} restore-keys: ${{ runner.os }}-go- - - name: Run go fmt - if: runner.os != 'Windows' - run: diff -u <(echo -n) <(gofmt -d -s .) - - - name: Run go vet - run: go vet ./... - - name: Run go test run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...