Repository navigation
ci: move lint job to reusable golangci-lint workflow - #235
Open
dwisiswant0 wants to merge 2 commits into
Open
dwisiswant0 wants to merge 2 commits into
dwisiswant0 wants to merge 2 commits into
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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