Skip to content

ci: add pre-main workflow for tests and linting#246

Open
sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
sebrandon1:add_workflows
Open

ci: add pre-main workflow for tests and linting#246
sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
sebrandon1:add_workflows

Conversation

@sebrandon1
Copy link
Member

Quality of life improvements.

I added a couple more make paths and added some automatic testing and linting for pull requests.

One of the biggest changes is that I had to migrate the existing .golangci.yml to v2.

CI/CD and Linting Workflow Enhancements:

  • Added a new GitHub Actions workflow (.github/workflows/pre-main.yml) to automatically run Go linting (golangci-lint), shell script formatting (shfmt), and tests on pull requests and pushes to the main branch.
  • Added lint, golangci-lint, and shfmt targets to the Makefile for easier local linting and formatting of Go and shell scripts.

Linting Configuration Improvements:

  • Overhauled the .golangci.yml configuration: switched to version: "2", enabled and fine-tuned a set of linters (including errorlint, gocyclo, gosec, loggercheck, etc.), improved depguard and revive rules, and added exclusions and formatters for better code quality and maintainability. [1] [2] [3]

Code Quality and Consistency Fixes:

  • Removed unnecessary break statements after append operations in addon-tools/helm-convert/convert/expectedvaluesfinder.go for cleaner code. [1] [2]
  • Improved error message consistency and clarity in pkg/compare/correlator.go.
  • Fixed a minor bug in pkg/compare/compare.go by using the correct IOStreams fields.
  • Improved test client setup logic in pkg/compare/compare_test.go for clarity and correctness.
  • Fixed template execution in pkg/compare/referenceV1.go to use the correct method.
  • Corrected method invocation in pkg/compare/referenceV2.go for processing manifest paths.

@openshift-ci
Copy link

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lack for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@lack
Copy link
Member

lack commented Dec 12, 2025

I love the change, and I'm all for moving golangci-lint up to v2; but now we have to update prow to match :)

In fact, maybe with the github actions in place, the prow checks are unneeded? Let's remove them if they are truly redundant, as github actions are generally easier to manage.

@sebrandon1
Copy link
Member Author

@lack I opened a PR here to remove it from prow: openshift/release#72623

@sebrandon1
Copy link
Member Author

@lack I've rebased the dependent PR (openshift/release#72623) to resolve the merge conflicts. Once that PR gets merged, the prow checks here should pass and we can proceed with merging this one.

@sebrandon1
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Feb 10, 2026

@sebrandon1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/golint 92cbbec link true /test golint
ci/prow/unit 92cbbec link true /test unit

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

2 participants