Skip to content

Commit

Permalink
Run drenv tests with lima vm
Browse files Browse the repository at this point in the history
On macos-13 we have nested virtualization and enough memory to start the
test cluster and run the tests.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Sep 19, 2024
1 parent 4c60295 commit 35d0f14
Showing 1 changed file with 57 additions and 2 deletions.
59 changes: 57 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,62 @@ jobs:
strategy:
matrix:
os:
- macos-14
# amd64, 4 cpus, 14 GiB RAM, nested virtalization supported
- macos-13
python-version:
- "3.12"
go-version:
- "1.23"
runs-on: ${{ matrix.os }}
env:
DRIVER: "vm"
steps:
- name: Checkout source
- name: Checkout ramen
uses: actions/checkout@v4

- name: Checkout lima
uses: actions/checkout@v4
with:
repository: lima-vm/lima
path: lima

- name: Checkout socket_vmnet
uses: actions/checkout@v4
with:
repository: lima-vm/socket_vmnet
path: socket_vmnet

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Install lima
run: |
cd lima
make minimal # 5 times faster than full make
sudo make install
limactl version
- name: Install socket_vmnet
run: |
cd socket_vmnet
make
make install.bin
make install.launchd
/opt/socket_vmnet/bin/socket_vmnet --version
- name: Install python packages
run: pip install -r requirements.txt

- name: Enable coverage for child processes
run: cp coverage.pth $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')

- name: Install drenv
run: pip install -e test

Expand All @@ -219,6 +257,22 @@ jobs:
run: make black
working-directory: test

- name: Start test cluster
run: make cluster
working-directory: test

- name: Run tests
run: make test
working-directory: test

- name: Report test coverage
run: make coverage
working-directory: test

- name: Clean up
run: make clean
working-directory: test

ramenctl:
name: ramenctl
strategy:
Expand All @@ -232,6 +286,7 @@ jobs:
- "3.12"
- "3.13-dev"
include:
# arm64, 3 cpus (M1), 7 GiB RAM, nested virtalization not supported.
- os: macos-14
python-version: "3.12"
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 35d0f14

Please sign in to comment.