From d4a47aebca9dd72945eff02e49a226f0bd858c95 Mon Sep 17 00:00:00 2001 From: Li4n0 Date: Wed, 21 Apr 2021 19:02:44 +0800 Subject: [PATCH] ci: config go-lint --- .github/workflows/go.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..6fdedd5 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +name: Go +on: + push: + branches: [ master ] + paths: + - '**.go' + - 'go.mod' + - '.github/workflows/go.yml' + pull_request: + paths: + - '**.go' + - 'go.mod' + - '.github/workflows/go.yml' +env: + GOPROXY: "https://proxy.golang.org" + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 +# Create frontend `dist` folder. +# +# - name: Create frontend dist folder +# run: mkdir frontend/dist/ && touch frontend/dist/1 + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v2.4.0 + with: + version: v1.37.0 + args: --timeout=30m