-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce golang ci lint action #723
Conversation
Signed-off-by: Tung Bui <[email protected]>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) <[email protected]>
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-action
to 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-lint
in.github/workflows/go-lint.yml
golangci-lint
on every PRworkflow_dispatch:
)Testing: