From 0b091e8cfbc23fd923888989d28fc9792a3c225e Mon Sep 17 00:00:00 2001 From: ohill <145173879+ohill@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:23:57 -0400 Subject: [PATCH] update warnings to remove unnecessary build --- .github/workflows/reviewdog.yml | 56 +++++++-------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 55c9ccb6..8415e7a5 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -10,8 +10,6 @@ jobs: uses: actions/checkout@v3.5.3 with: fetch-depth: 0 # required for new-from-rev option in .golangci.yml - - name: Install libraries - run: sudo apt-get -y -q install libboost-math-dev - name: Install specific golang uses: actions/setup-go@v4.0.1 with: @@ -19,6 +17,7 @@ jobs: - name: reviewdog-golangci-lint uses: reviewdog/action-golangci-lint@v2.3.1 with: + github_token: ${{ secrets.GITHUB_TOKEN }} go_version_file: go.mod golangci_lint_version: "v1.53.2" golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners" @@ -35,50 +34,19 @@ jobs: uses: actions/checkout@v3.5.3 with: fetch-depth: 0 # required for new-from-rev option in .golangci.yml - - name: Install libraries - run: sudo apt-get -y -q install libboost-math-dev - name: Install specific golang uses: actions/setup-go@v4.0.1 with: go-version: '1.20.14' - - name: Add bin to PATH - run: | - echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH - echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH - - name: Create folders for golangci-lint - run: mkdir -p cicdtmp/golangci-lint - - name: Check if custom golangci-lint is already built - id: cache-golangci-lint - uses: actions/cache@v3.3.1 + - name: reviewdog-golangci-lint + uses: reviewdog/action-golangci-lint@v2.3.1 with: - path: cicdtmp/golangci-lint/golangci-lint-cgo - key: cicd-golangci-lint-cgo-v0.0.2 - - - name: Build custom golangci-lint with CGO_ENABLED - if: steps.cache-golangci-lint.outputs.cache-hit != 'true' - run: | - cd cicdtmp/golangci-lint - git clone https://github.com/golangci/golangci-lint.git . - git checkout tags/v1.53.2 - CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint - ./golangci-lint-cgo --version - cd ../../ - - name: Install reviewdog - run: | - curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.14.1/install.sh | sh -s - reviewdog --version - - name: Run golangci-lint with reviewdog - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: > - ./cicdtmp/golangci-lint/golangci-lint-cgo run - --out-format line-number - -c .golangci-warnings.yml - --allow-parallel-runners - | reviewdog - -f=golangci-lint - -name="Lint Warnings" - -reporter=github-check - -filter-mode=added - -fail-on-error=false - -level=warning + github_token: ${{ secrets.GITHUB_TOKEN }} + go_version_file: go.mod + golangci_lint_version: "v1.53.2" + golangci_lint_flags: "-c .golangci-warnings.yml --allow-parallel-runners" + reporter: "github-pr-check" + tool_name: "Lint Warnings" + level: "warning" + fail_on_error: false + filter_mode: "added"