From 725573c189f29f8964b1fa269846c3515e7990f3 Mon Sep 17 00:00:00 2001 From: Szzrain Date: Sat, 19 Oct 2024 03:09:14 -0400 Subject: [PATCH] ci: try use curled runner --- .github/workflows/reviewdog.yml | 10 ++++++---- .reviewdog.yml | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .reviewdog.yml diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 4522af2d..1e1ea03c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -5,12 +5,12 @@ on: paths: - '**.go' - 'go.mod' - - '.github/workflows/reviewdog.yml' + - '.github/workflows/.reviewdog.yml' pull_request: paths: - '**.go' - 'go.mod' - - '.github/workflows/reviewdog.yml' + - '.github/workflows/.reviewdog.yml' jobs: review-dog: @@ -30,11 +30,13 @@ jobs: cache: false - run: go get - run: go generate ./... + - name: Set Up Golint + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 - uses: reviewdog/action-setup@v1 with: reviewdog_version: latest - - name: Run reviewdog + - name: Run golang-ci & reviewdog env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEW_DOG_TOKEN }} run: | - reviewdog -reporter=github-pr-review -runners=golint,govet \ No newline at end of file + golangci-lint run | reviewdog -reporter=github-pr-review -f=golangci-lint \ No newline at end of file diff --git a/.reviewdog.yml b/.reviewdog.yml new file mode 100644 index 00000000..e3f29d13 --- /dev/null +++ b/.reviewdog.yml @@ -0,0 +1,10 @@ +# reviewdog.yml +runner: + golint-by-project-conf: + cmd: golint $(go list ./... | grep -v /vendor/) + format: golint + level: warning + govet-by-project-conf: + cmd: go vet + format: govet + level: error \ No newline at end of file