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.

Change provider default to use lima instead of hyperkit so we run the
same code used in developers machines in the CI.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Sep 19, 2024
1 parent 4c60295 commit bbed4c9
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,64 @@ 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
echo 'PATH="_output/bin:${PATH}"' >> $GITHUB_PATH
- name: Check lima
run:
limactl version

- name: Install socket_vmnet
run: |
cd socket_vmnet
make
make install.bin
make install.launchd
- 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 +259,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 +288,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 bbed4c9

Please sign in to comment.