feat: introduce golang ci lint action#723
Conversation
Signed-off-by: Tung Bui <tung.bquang@gmail.com>
3cf8b89 to
9e1f61d
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #723 +/- ##
=======================================
Coverage 46.59% 46.59%
=======================================
Files 40 40
Lines 2232 2232
=======================================
Hits 1040 1040
Misses 1105 1105
Partials 87 87 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
shizhMSFT
left a comment
There was a problem hiding this comment.
This PR decreases the code coverage for 17.04%. Could you take a look?
.github/workflows/go-lint.yml
Outdated
| uses: golangci/golangci-lint-action@v3 | ||
| with: | ||
| version: latest | ||
| only-new-issues: true |
There was a problem hiding this comment.
Since this is the first time we introduce the CI lint, we should sweep the code for any existing issues and resolve them. Therefore, we need to set only-new-issues to false, which is the default value.
There was a problem hiding this comment.
Updated. Using the default value to catch all the existing issues
.github/workflows/go-lint.yml
Outdated
| - uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: '1.20' | ||
| cache: false |
There was a problem hiding this comment.
If we use a fixed version of golang, which is recommended, we can resuse the cache for perf and cost.
There was a problem hiding this comment.
Thanks for your suggestion. I updated in the latest commit
|
This issue that caused by Zot V2.0.0-rc.5 update will be resolved in #727
|
Signed-off-by: Tung Bui Quang (Leo) <tung.bquang@gmail.com>
d831cb4 to
79beaf2
Compare
Thanks for pointing this @JeyJeyGao |
|
This PR is stale because it has been opened for 45 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days. |
|
PR closed due to no activity in the past 30 days. |
Resolves: #718
Background (mentioned in the issue #718 ):
Changes:
golangci-lint-actionto the CI workflows as it's the official GitHub action for golangci-lint from its authors. The action runs golangci-lint and reports issues from linters.golangci-lintin.github/workflows/go-lint.ymlgolangci-linton every PRworkflow_dispatch:)Testing: