Skip to content
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

test: add basic CI testing against PRs via new Github Action #88

Conversation

aaron-prindle
Copy link
Collaborator

@aaron-prindle aaron-prindle commented Jan 4, 2025

This PR adds a simple Github Action that runs against PRs targeting our feature branch (validation-gen) that does the following:

  • runs go mod tidy and verifies no files are changed
  • runs
    • go test ./staging/src/[k8s.io/code-generator/cmd/validation-gen/code-generator/cmd/...
    • go test ./stagings/src/k8s.io/apimachinery/pkg/api/...
    • go test ./stagings/src/k8s.io/apimachinery/pkg/util/...
    • This runs our go unit tests and and additionally sets UPDATE_VALIDATION_GEN_FIXTURE_DATA=true and also verifies that no files are changed from the test fixture running
  • runs hack/update-codegen.sh validation and verifies that no files are changed

Currently this PR is should be merged after #87 and rebased to get the CI to green. I've included those changes in this PR for now to get to green, I will rebase to drop those changes once they are merged

I tested this that the Github Action runs in my k8s fork's aprindle/kubernetes validation-gen branch and it runs/works, see here:
aaron-prindle#8

Screenshot from this PR against my k8s fork's aprindle/kubernetes validation-gen branch (which uses this same PR branch):
image

Not sure why it doesn't run on this PR, I think it might related to repo or user perms related to security.

NOTE
In creating this I caught some current test issues related to go mod tidy and the subfield go unit and fixture tests. I fixed these in this PR as well

@aaron-prindle aaron-prindle force-pushed the validation-gen-aaron-prindle-add-ci-v2 branch 12 times, most recently from a949784 to f7c55d2 Compare January 6, 2025 22:55
@aaron-prindle aaron-prindle requested a review from thockin January 6, 2025 22:58
@aaron-prindle aaron-prindle force-pushed the validation-gen-aaron-prindle-add-ci-v2 branch 2 times, most recently from 75eb768 to 48390e0 Compare January 7, 2025 00:11
@aaron-prindle aaron-prindle force-pushed the validation-gen-aaron-prindle-add-ci-v2 branch from 48390e0 to 30dad41 Compare January 7, 2025 00:23
@thockin thockin merged commit fdd4e43 into jpbetz:validation-gen Jan 7, 2025
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