-
Notifications
You must be signed in to change notification settings - Fork 3.2k
docs: document hack/ci/ci.sh lima workflow in test/README.md #29033
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,36 @@ go test -v ./libpod/ | |
| go test -v -run TestMyFunction ./pkg/specgen/ | ||
| ``` | ||
|
|
||
| ## Reproducing CI failures locally with lima | ||
|
|
||
| `hack/ci/ci.sh` runs a CI test suite inside the same lima VM image used by | ||
| upstream CI. The script requires `limactl`, starts a nested-virtualization VM | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should link to lima https://lima-vm.io/docs/installation/ |
||
| with 8 GB of memory, copies this repository into the VM, and runs | ||
| `hack/ci/runner.sh` there, so the host distro does not matter. | ||
|
|
||
| The invocation is positional and takes 2 to 4 arguments: | ||
|
|
||
| ```bash | ||
| hack/ci/ci.sh TEST DISTRO | ||
| hack/ci/ci.sh TEST PRIV DISTRO | ||
| hack/ci/ci.sh TEST MODE PRIV DISTRO | ||
| ``` | ||
|
|
||
| `TEST` is the suite, one of `build`, `apiv2`, `bindings`, `bud`, `compose_v2`, | ||
| `docker_py`, `unit`, `upgrade`, `int`, `sys`, or `machine`. `MODE` is `local` | ||
| or `remote` and defaults to `local`. `PRIV` is `root` or `rootless` and defaults | ||
| to `rootless`. `DISTRO` must be one of `fedora-current`, `fedora-prior`, | ||
| `fedora-rawhide`, or `debian-sid`. | ||
|
Comment on lines
+60
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like this style listing. I would use a proper list, for example:
Comment on lines
+52
to
+64
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While that is fine it misses the main point, the CI task names are design to follow this exact pattern so for a specific CI failure a user just has to copy paste the name, i.e. the part before |
||
|
|
||
| For the `upgrade` suite the `MODE` slot is reused to pass the version to upgrade | ||
| from (e.g. `v5.3.1`) rather than `local`/`remote`. | ||
|
|
||
| ```bash | ||
| hack/ci/ci.sh sys remote rootless fedora-current | ||
| ``` | ||
|
|
||
| Some parts of the test suite cannot run inside the VM. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which of them? I would list them.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any CI job that is called |
||
|
|
||
| # Test utils | ||
| Test utils provide common functions and structs for testing. It includes two structs: | ||
| * `PodmanTest`: Handle the *podman* command and other global resources like temporary | ||
|
|
||
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 would move this to the end of the file, it is normally not needed by most users as running a test directly on the system is faster as it does not need to pull these huge qcow images.