Skip to content

Commit

Permalink
Add golangci-lint to Go build step
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Apr 26, 2020
1 parent ddeefad commit f309749
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/pipeline.yml
Expand Up @@ -9,6 +9,20 @@ on:
branches:
- master
jobs:
golangci-lint:
name: Lint Server
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Run golangci-lint
uses: actions-contrib/golangci-lint@v1
with:
golangci_lint_version: v1.25.0
# TODO Enable github actions output format: https://github.com/actions-contrib/golangci-lint/issues/11
# args: run --out-format github-actions

go:
name: Test Server on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -76,7 +90,7 @@ jobs:

binaries:
name: Binaries
needs: [js, go]
needs: [js, go, golangci-lint]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand Down
11 changes: 11 additions & 0 deletions .golangci.yml
@@ -0,0 +1,11 @@
linters:
enable:
- goimports
- unconvert
- gosec

issues:
exclude-rules:
- linters:
- gosec
text: "(G501|G401):"

0 comments on commit f309749

Please sign in to comment.