Skip to content

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

Open
dwisiswant0 wants to merge 2 commits into
devfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow
Open

dwisiswant0 wants to merge 2 commits into
devfrom
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.yml 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.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow.

tests.yml now also runs on push to dev. 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 dev, where every pull request can restore them.

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

Closes: #234

Replace lint-test.yml with a lint job in build-test.yml 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.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow.

tests.yml now also runs on push to dev. 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 dev, where every pull request can restore them.

Closes: #234
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: #234
Signed-off-by: Dwi Siswanto <git@dw1.io>
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.

1 participant