kubewarden / github-actions

GitHub actions used by the Kubewarden project
https://kubewarden.io
Apache License 2.0
4 stars 7 forks source link

feat: run only lib tests for rust policies. #99

Closed jvanz closed 8 months ago

jvanz commented 8 months ago

Description

In the reusable workflow to perform basic validation in the Rust policies, we run all the tests in the policy. This can cause issues if the policy uses Rust to run e2e tests with kwctl. This commit updates the workflow to run only lib tests which are the policy unit tests.

viccuad commented 8 months ago

I would prefer to leave it as it was. That way we also run integration tests and run the examples, if any, which is cheap. If not, I would add --tests --examples.

jvanz commented 8 months ago

As I said in this comment. I've open this PR to allow a policy to run e2e in Rust. This workflow does not install the kwctl in the runner. If we want to run more elaborate tests using other commands/binaries, this workflow must be updated. I've decided to not do it because I think that installing kwctl is more invasive than just running the lib tests

viccuad commented 8 months ago

Looking at this GHA, and the Makefile and workflows of the pod-privileged-policy, I don't see the bats e2e tests from make e2e-tests being run. I'm ok running only lib tests for rust policies, but we should ensure we run the e2e tests.

flavio commented 8 months ago

Closing, not needed as discussed during the daily