From 307a0166c5c0bd623f26f5701d9ee60f3b6641be Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 22 Feb 2024 09:38:25 +0000 Subject: [PATCH] build: Add GitHub action for unit/integration testing Signed-off-by: Rob Bradford --- .github/workflows/integration-x86-64.yaml | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/integration-x86-64.yaml diff --git a/.github/workflows/integration-x86-64.yaml b/.github/workflows/integration-x86-64.yaml new file mode 100644 index 000000000..5252b87a1 --- /dev/null +++ b/.github/workflows/integration-x86-64.yaml @@ -0,0 +1,38 @@ +name: Cloud Hypervisor Tests (x86-64) +on: [pull_request, create] + +jobs: + build: + if: github.event_name == 'pull_request' + name: Tests (x86-64) + runs-on: garm-jammy + steps: + - name: Code checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Docker + run: | + sudo apt-get update + sudo apt-get -y install ca-certificates curl gnupg + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + sudo apt install -y docker-ce docker-ce-cli + - name: Prepare for VDPA + run: scripts/prepare_vdpa.sh + - name: Run unit tests + run: scripts/dev_cli.sh tests --unit + - name: Load openvswitch module + run: sudo modprobe openvswitch + - name: Run integration tests + run: scripts/dev_cli.sh tests --integration + - name: Run live-migration integration tests + run: scripts/dev_cli.sh tests --integration-live-migration + - name: Run unit tests (musl) + run: scripts/dev_cli.sh tests --unit --libc musl + - name: Run integration tests (musl) + run: scripts/dev_cli.sh tests --integration --libc musl + - name: Run live-migration integration tests (musl) + run: scripts/dev_cli.sh tests --integration-live-migration --libc musl \ No newline at end of file