-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCP4: Add workflow to test ocp content #11615
Conversation
ComplianceAsCode/compliance-operator#493 needs to merge before this can work |
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
f027a8c
to
fd7a65e
Compare
Checking whether the compliance-operator can parse the data stream is important, but the test in https://github.com/ComplianceAsCode/compliance-operator/pull/493/files# seem too specific and contained. I wonder if we could have a more thorough "smoke" integration test, something that runs CO and consumes the data stream. |
the reason for this one I think is to have some gating on if CO can parse the datastream, but not to run a full on CI e2e job, however I think we can improve the test here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is on the right track. Just some feedback on isolating the test implementation details to the compliance-operator code base, so that the content repository doesn't need to understand how the test is implemented to call it.
git clone https://github.com/ComplianceAsCode/compliance-operator.git | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '>=1.19.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to have to bump this go version separately each time we bump it in the compliance-operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will use the latest go,
Run go version
go version go1.22.0 linux/amd6[4](https://github.com/ComplianceAsCode/content/actions/runs/8007294791/job/21871061364?pr=11615#step:5:5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh - this is just enforcing a lower bound. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will be testing with a version of golang (1.22) that's potentially different from the version of golang we build the operator with, correct?
So there would be a chance that the tests we invoke using https://github.com/ComplianceAsCode/compliance-operator/pull/493/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R589 would break against the latest version of golang we're using here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point, I changed this part to fetching the go version from the CO go.mod file
thanks for the review, just had those tests changed to use the make target instead. |
Add this workflow so we can test ocp4 content can be parsed on each PR
Code Climate has analyzed commit 894dfa9 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.1% (-1.1% change). View more on Code Climate. |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments have been addressed, and I think we can start with this approach and iterate on it as needed.
Leave it open for @yuumasato to ensure his comments are addressed.
This PR is adding a new GH workflow, there is no need to rebase to trigger hardening tests. |
Add this workflow so we can test ocp4 content can be parsed on each PR