Skip to content

Create dedicated lint CI job#1181

Merged
ahrtr merged 1 commit intoetcd-io:mainfrom
ivanvc:split-lint-ci-job
Apr 3, 2026
Merged

Create dedicated lint CI job#1181
ahrtr merged 1 commit intoetcd-io:mainfrom
ivanvc:split-lint-ci-job

Conversation

@ivanvc
Copy link
Copy Markdown
Member

@ivanvc ivanvc commented Apr 2, 2026

  • Remove the linting step from all the workflows; it should help with speed when running those CI jobs.
  • Introduce a new lint job and a template to simplify reusing it for Windows and Linux.

Ref: #1178 (comment)

@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 2, 2026

I think I need a manual approval for the new workflow.

Comment thread .github/workflows/lint_template.yaml
@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 2, 2026

I'll squash commits after we have a successful run. I want to keep the commit history in case I need to revert.

@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 3, 2026

@ahrtr, could you please click the button to run the workflows I added? I can also test on my fork otherwise. Thanks.

* Remove the linting step from all the workflows, it should help with
speed when running those CI jobs.
* Introduce a new lint job and a template to simplify reusing it for
  Windows and Linux.

Signed-off-by: Ivan Valdes <ivan@vald.es>
@ivanvc ivanvc force-pushed the split-lint-ci-job branch from 3b91676 to 68aeba9 Compare April 3, 2026 17:02
Copy link
Copy Markdown
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM & thx

@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, ivanvc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented Apr 3, 2026

@ahrtr, could you please click the button to run the workflows I added?

Sorry, did not get your question. Where to click the button? Seems that you need to add workflow_dispatch to the workflow first?

@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 3, 2026

Sorry, did not get your question. Where to click the button? Seems that you need to add workflow_dispatch to the workflow first?

If you see the checks for this pull request, the new Lint jobs are not running. This is because GitHub doesn't run new workflows in PRs unless manually approved by a maintainer. It's a security measure. You should have something like this in the PR:

Source: https://github.blog/open-source/maintainers/github-actions-update-helping-maintainers-combat-bad-actors/

@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 3, 2026

If there's no button to approve my new workflow, I may have a configuration issue blocking it.

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented Apr 3, 2026

You should have something like this in the PR:

No, I do not see it. As mentioned in previous comment, you need to add workflow_dispatch first to see the button.

It's OK, we can merge this PR for now, and see the workflow on main branch.

@ahrtr ahrtr merged commit 0862515 into etcd-io:main Apr 3, 2026
44 checks passed
@ivanvc
Copy link
Copy Markdown
Member Author

ivanvc commented Apr 3, 2026

I found the issue. I'll open a new PR to address it.

shuan1026 added a commit to shuan1026/bbolt that referenced this pull request Apr 12, 2026
- Add lint.yaml and lint_template.yaml to run golangci-lint as a
  dedicated job for both Linux and Windows, using shell: bash to
  ensure  works correctly on Windows runners.
- Remove golangci-lint steps from tests-template.yml and
  tests_windows.yml; lint is now handled exclusively by lint.yaml.
- Fix Windows Go version setup by using go-version-file in
  tests_windows.yml instead of the two-step goversion approach.

Ref: etcd-io#1181
shuan1026 added a commit to shuan1026/bbolt that referenced this pull request Apr 12, 2026
- Add lint.yaml and lint_template.yaml to run golangci-lint as a
  dedicated job for both Linux and Windows, using shell: bash to
  ensure  works correctly on Windows runners.
- Remove golangci-lint steps from tests-template.yml and
  tests_windows.yml; lint is now handled exclusively by lint.yaml.
- Fix Windows Go version setup by using go-version-file in
  tests_windows.yml instead of the two-step goversion approach.

Ref: etcd-io#1181
Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com>
shuan1026 added a commit to shuan1026/bbolt that referenced this pull request Apr 13, 2026
- Add lint.yaml and lint_template.yaml to run golangci-lint as a
  dedicated job for both Linux and Windows, using shell: bash to
  ensure  works correctly on Windows runners.
- Remove golangci-lint steps from tests-template.yml and
  tests_windows.yml; lint is now handled exclusively by lint.yaml.
- Fix Windows Go version setup by using go-version-file in
  tests_windows.yml instead of the two-step goversion approach.

Ref: etcd-io#1181
Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com>
shuan1026 added a commit to shuan1026/bbolt that referenced this pull request Apr 13, 2026
- Add lint.yaml and lint_template.yaml to run golangci-lint as a
  dedicated job for both Linux and Windows, using shell: bash to
  ensure  works correctly on Windows runners.
- Remove golangci-lint steps from tests-template.yml and
  tests_windows.yml; lint is now handled exclusively by lint.yaml.
- Fix Windows Go version setup by using go-version-file in
  tests_windows.yml instead of the two-step goversion approach.

Ref: etcd-io#1181
Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants