Skip to content

ci: move lint job to reusable golangci-lint workflow - #577

Merged
Mzack9999 merged 2 commits into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow
Dec 3, 2026
Merged

Mzack9999 merged 2 commits into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow

Conversation

@dwisiswant0

@dwisiswant0 dwisiswant0 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Replace lint-test.yml with a lint job in build_test.yaml that calls
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The build job now needs lint and doesn't run when lint fails.

Rename build_test.yaml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow. Point the README badge at
tests.yml.

tests.yml now also runs on push to main. A cache saved by a pull_request
run is visible only to that pull request, so the Go and golangci-lint
caches never carried over from one pull request to the next. A push run
saves them on main, where every pull request can restore them. Pull
requests and pushes now run it only when they change a .go or .mod file;
before, every pull request ran lint and the build job.

The lint timeout goes from 5m to the workflow's default of 30m.

tests.yml also runs when tests.yml itself changes, so this pull request runs the new lint job.

Closes: #576

Replace lint-test.yml with a lint job in build_test.yaml that calls
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The build job now needs lint and doesn't run when lint fails.

Rename build_test.yaml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow. Point the README badge at
tests.yml.

tests.yml now also runs on push to main. A cache saved by a pull_request
run is visible only to that pull request, so the Go and golangci-lint
caches never carried over from one pull request to the next. A push run
saves them on main, where every pull request can restore them. Pull
requests and pushes now run it only when they change a .go or .mod file;
before, every pull request ran lint and the build job.

The lint timeout goes from 5m to the workflow's default of 30m.

Closes: #576
Signed-off-by: Dwi Siswanto <git@dw1.io>
@dwisiswant0 dwisiswant0 self-assigned this Dec 3, 2026
@dwisiswant0
dwisiswant0 requested a review from Mzack9999 December 3, 2026 02:45
The paths filters matched only Go and module files, so a change
to the workflow itself, including this pull request, never ran
it. Add tests.yml to both lists.

Refs: #576
Signed-off-by: Dwi Siswanto <git@dw1.io>
@Mzack9999
Mzack9999 merged commit ee6f8b8 into main Dec 3, 2026
8 checks passed
@Mzack9999
Mzack9999 deleted the dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow branch December 3, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the lint job to the reusable golangci-lint workflow

2 participants