summaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aa6bfb1e4..efa898bc5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -85,3 +85,18 @@ jobs:
- name: Check Cheatsheet
run: |
go run scripts/cheatsheet/main.go check
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Lint
+ uses: golangci/golangci-lint-action@v2
+ with:
+ version: latest
+ - name: Format code
+ run: |
+ if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
+ find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
+ exit 1
+ fi