From bd1e7b310118986cc1595c59eaa69502e55702ad Mon Sep 17 00:00:00 2001 From: lestrrat <49281+lestrrat@users.noreply.github.com> Date: Wed, 20 Apr 2022 09:17:27 +0900 Subject: [PATCH] Factor out linting (#31) --- .github/workflows/ci.yml | 3 --- .github/workflows/lint.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3cfbe9..39b6c3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,6 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - - name: Install GolangCI-Lint - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2 - name: Test with coverage run: make cover - name: Upload code coverage to codecov @@ -25,4 +23,3 @@ jobs: uses: codecov/codecov-action@v1 with: file: ./coverage.out - - run: make lint diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9d7de75 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +name: lint +on: [push] +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + check-latest: true + - uses: golangci/golangci-lint-action@v2 + with: + version: v1.45.2 + - name: Run go vet + run: | + go vet ./...