Skip to content

Commit

Permalink
Add github workflows to run VM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelroquetto committed Aug 24, 2024
1 parent 60ddd21 commit 1fe6d4f
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pull_request_integration_tests_vm_5.15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pull request integration tests on VM 5.15

on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]

jobs:
test:
uses: ./.github/workflows/workflow_integration_tests_vm.yml
with:
arch: x86_64
kernel-version: 5.15.152
14 changes: 14 additions & 0 deletions .github/workflows/pull_request_integration_tests_vm_6.10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pull request integration tests on VM 6.10

on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]

jobs:
test:
uses: ./.github/workflows/workflow_integration_tests_vm.yml
with:
arch: x86_64
kernel-version: 6.10.6
53 changes: 53 additions & 0 deletions .github/workflows/workflow_integration_tests_vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Pull request integration tests on VM

on:
workflow_call:
inputs:
arch:
description: 'Target architecture to run the tests'
required: true
type: string
kernel-version:
description: 'Kernel version to use when running the tests'
required: true
type: string
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Clean up disk space
run: |
docker system prune -af
docker volume prune -f
- name: Install QEMU
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends qemu-utils qemu-system-x86
- name: Run VM integration tests
run: |
sudo make -C test/vm KERNEL_VER=${{ inputs.kernel-version }} ARCH=${{ inputs.arch }} && [ -f testoutput/success ]
timeout-minutes: 60
- name: Upload integration test logs
uses: actions/upload-artifact@v3
if: always()
with:
name: Test Logs
path: |
testoutput/*.log
testoutput/kind
- name: Report coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./testoutput/itest-covdata.txt
flags: integration-test

0 comments on commit 1fe6d4f

Please sign in to comment.