From 27b8f1a7a2143939ee7dde6970682947af30292b Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Sun, 21 Jul 2024 20:29:16 -0600 Subject: [PATCH] ci(lint): show all warnings, but only fail deprecated ones --- .github/workflows/lint.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fe7226e9bbb4a..dfbe28d7eb91e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,13 +14,25 @@ jobs: golangci: name: golangci-lint runs-on: ubuntu-latest + strategy: + matrix: + mode: [no-deprecations, no-failure] steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + # https://github.com/golangci/golangci-lint/issues/3862#issuecomment-1572973588 + - run: echo "GOROOT=$(go env GOROOT)" >> $GITHUB_ENV - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: v1.49.0 + args: --timeout=3m + ${{ matrix.mode == 'no-deprecations' && '--exclude=^SA1019' || '' }} + ${{ matrix.mode == 'no-failure' && '--issues-exit-code=0' || '' }} + # for pull requests, show only new issues + # only-new-issues: true + only-new-issues: false + \ No newline at end of file