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

ci: Add ci workflow #3

Merged
merged 3 commits into from
Dec 19, 2024
Merged

ci: Add ci workflow #3

merged 3 commits into from
Dec 19, 2024

Conversation

viccuad
Copy link
Member

@viccuad viccuad commented Dec 17, 2024

Description

Part of kubewarden/kubewarden-controller#806.

Add ci.yml workflow for PRs, that starts 1 job per policy to be tested, if there's any change inside the policy folder.

Test

This was tested in my viccuad/rego-policies repo.

To see how it looks on a PR:
viccuad/rego-policies#4
Note how there's 2 jobs per policy scheduled, some of them fail, some succeed, all of that expected.

To see how it looks on main:
https://github.com/viccuad/rego-policies/actions/runs/12374488427
Note that the calculate-policy-dirs creates a strategy matrix that is correctly empty, so no follow-up jobs are scheduled.

Additional Information

Tradeoff

Potential improvement

@viccuad viccuad self-assigned this Dec 17, 2024
@viccuad viccuad changed the title Add ci workflow ci: Add ci workflow Dec 17, 2024
@viccuad viccuad force-pushed the add-ci-workflow branch 2 times, most recently from 1287d55 to 42cf392 Compare December 17, 2024 16:38
jvanz
jvanz previously requested changes Dec 17, 2024
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
@viccuad viccuad requested a review from jvanz December 18, 2024 12:44
@viccuad
Copy link
Member Author

viccuad commented Dec 18, 2024

Added an initial README content as well.

@fabriziosestito
Copy link

@viccuad I've noticed some step names are showing as the first line of the run block, could we assign a clearer name to the affected steps?

image

image

Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
@viccuad
Copy link
Member Author

viccuad commented Dec 18, 2024

Slightly reworded readme.

@viccuad viccuad dismissed jvanz’s stale review December 18, 2024 15:29

now it correctly points to kubewarden/github-actions(...)@v3.4.0

@viccuad
Copy link
Member Author

viccuad commented Dec 18, 2024

Ready for merge, github-actions v3.4.0 are tagged already.

@flavio flavio merged commit 1b86e68 into kubewarden:main Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants