File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ See also <https://github.com/cncf/foundation/blob/main/allowed-third-party-licen
21
21
22
22
Pull requests can be submitted to < https://github.com/lima-vm/lima/pulls > .
23
23
24
+ It is highly suggested to add [ tests] ( ../../dev/testing/ ) for every non-trivial pull requests.
25
+ A test can be implemented as a unit test rather than an integration test when it is possible,
26
+ to avoid slowing the integration test CI.
27
+
24
28
## Merging pull requests
25
29
26
30
[ Committers] ( ../governance ) can merge pull requests.
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Testing
3
+ weight : 20
4
+ ---
5
+
6
+ ## Unit tests
7
+
8
+ The unit tests are written in Go and can be executed with the following commands:
9
+
10
+ ``` bash
11
+ go test -v ./...
12
+ ```
13
+
14
+ The unit tests do not execute actual virtual machines.
15
+
16
+ ## Integration tests
17
+
18
+ The integration tests incurs actual execution of virtual machines.
19
+
20
+ The integration tests are written in bash and partially in Perl.
21
+
22
+ Use [ ` hack/test-templates.sh ` ] ( https://github.com/lima-vm/lima/blob/master/hack/test-templates.sh )
23
+ to execute integration tests, with a virtual machine template file, e.g.,:
24
+
25
+ ``` bash
26
+ ./hack/test-templates.sh ./templates/default.yaml
27
+ ./hack/test-templates.sh ./templates/fedora.yaml
28
+ ./hack/test-templates.sh ./hack/test-templates/test-misc.yaml
29
+ ```
30
+
31
+ ## CI
32
+
33
+ [ ` .github/workflows/test.yml ` ] ( https://github.com/lima-vm/lima/blob/master/.github/workflows/test.yml )
34
+ executes the unit tests and the integration tests on the GitHub Actions with the [ "Tier 1"] ( ../../templates/ ) templates.
35
+
36
+ Most integration tests are executed on Linux runners, as macOS runners are slow and flaky.
37
+
38
+ The tests about macOS-specific features (e.g., vz and vmnet) are still executed on macOS runners.
39
+
40
+ Currently, the Intel version of macOS is used, as the ARM version of macOS on GitHub Actions still
41
+ do not support nested virtualization.
You can’t perform that action at this time.
0 commit comments