From c6e2fc4acbd07078097c7b62053fdffc6d80ada9 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Wed, 20 Apr 2022 19:57:50 -0500 Subject: [PATCH 1/4] fix gha reviewdog workflow so it actually uses go 1.17 it was installing 1.18 which can panic or have a variety of silent failures. See: https://github.com/reviewdog/action-golangci-lint/issues/249 --- .github/workflows/reviewdog.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 1e0515d0..38314fc9 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -5,6 +5,10 @@ name: reviewdog on: pull_request: +# NOTE: We have to specify `go_version: 1.17` because the action was installing 1.18. +# 1.18, in turn, is not fully supported by golangci-lint yet, and it can fail silently: +# see: https://github.com/reviewdog/action-golangci-lint/issues/249 + # pipeline to execute jobs: diff-review: @@ -19,6 +23,7 @@ jobs: uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.github_token }} + go_version: 1.17 golangci_lint_flags: "--config=.golangci.yml" fail_on_error: true filter_mode: diff_context @@ -36,6 +41,7 @@ jobs: uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.github_token }} + go_version: 1.17 golangci_lint_flags: "--config=.golangci.yml" fail_on_error: false filter_mode: nofilter From b9235cc48c7b823bca10b6ca79ed25b1f608ca3e Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Wed, 20 Apr 2022 20:07:24 -0500 Subject: [PATCH 2/4] fix(ci): use go 1.17.9 in reviewdog --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 38314fc9..2a8f5ee9 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -23,7 +23,7 @@ jobs: uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.github_token }} - go_version: 1.17 + go_version: 1.17.9 golangci_lint_flags: "--config=.golangci.yml" fail_on_error: true filter_mode: diff_context @@ -41,7 +41,7 @@ jobs: uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.github_token }} - go_version: 1.17 + go_version: 1.17.9 golangci_lint_flags: "--config=.golangci.yml" fail_on_error: false filter_mode: nofilter From b545e1acb01d016f77699d368abf6ccf552cc42a Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Wed, 20 Apr 2022 20:10:11 -0500 Subject: [PATCH 3/4] fix: drop golang container since reviewdog always installs go --- .github/workflows/reviewdog.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 2a8f5ee9..c2a53c4a 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -13,8 +13,6 @@ on: jobs: diff-review: runs-on: ubuntu-latest - container: - image: golang:1.17 steps: - name: clone uses: actions/checkout@v3 @@ -31,8 +29,6 @@ jobs: full-review: runs-on: ubuntu-latest - container: - image: golang:1.17 steps: - name: clone uses: actions/checkout@v3 From b27926d42c65da867489eb31561c7de646008b6a Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Wed, 20 Apr 2022 20:13:06 -0500 Subject: [PATCH 4/4] fix(ci): make golangci-lint verbose --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index c2a53c4a..7a53e50c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -22,7 +22,7 @@ jobs: with: github_token: ${{ secrets.github_token }} go_version: 1.17.9 - golangci_lint_flags: "--config=.golangci.yml" + golangci_lint_flags: "--config=.golangci.yml --verbose" fail_on_error: true filter_mode: diff_context reporter: github-pr-review @@ -38,6 +38,6 @@ jobs: with: github_token: ${{ secrets.github_token }} go_version: 1.17.9 - golangci_lint_flags: "--config=.golangci.yml" + golangci_lint_flags: "--config=.golangci.yml --verbose" fail_on_error: false filter_mode: nofilter