diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3056d88b..c680b015 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.15 + - name: Set up Go 1.17 uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.17 id: go - name: Check out code into the Go module directory @@ -28,4 +28,4 @@ jobs: run: | export PATH=${PATH}:`go env GOPATH`/bin scripts/devtools.sh - make local build \ No newline at end of file + make local build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..90581816 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Golangci-lint + +on: [push, pull_request] +jobs: + + golangci: + name: Lint + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.17 + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest + args: --verbose \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..6a2fb773 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,5 @@ +run: + timeout: 5m +linters: + enabled: + - goimports \ No newline at end of file