diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 01a9520..980b536 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,33 +18,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Install golint - run: go get -u -v golang.org/x/lint/golint + - name: Install golangci-lint + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.24.0 - - name: Lint! - run: | - export PATH=$PATH:$(go env GOPATH)/bin - golint -set_exit_status ./... - - format: - name: Go format - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Test gogmt - run: test $(gofmt -l -e . | wc -l) -eq 0 - - - name: Print gofmt errors - if: failure() - run: gofmt -d . + - name: Run golangci-lint + run: ./bin/golangci-lint run ./... --enable golint,unparam,misspell test: name: Tests @@ -92,19 +70,3 @@ jobs: - name: Go install run: go install . - - install: - name: Install - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Go install - run: go install . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 019e289..6e8931a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,33 +22,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Install golint - run: go get -u -v golang.org/x/lint/golint + - name: Install golangci-lint + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.24.0 - - name: Lint! - run: | - export PATH=$PATH:$(go env GOPATH)/bin - golint -set_exit_status ./... - - format: - name: Go format - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Test gogmt - run: test $(gofmt -l -e . | wc -l) -eq 0 - - - name: Print gofmt errors - if: failure() - run: gofmt -d . + - name: Run golangci-lint + run: ./bin/golangci-lint run ./... --enable golint,unparam,misspell test: name: Tests @@ -101,7 +79,6 @@ jobs: name: Build needs: - lint - - format - test runs-on: ubuntu-latest steps: