diff --git a/.github/workflows/pull_request_integration_tests_vm_5.15.yml b/.github/workflows/pull_request_integration_tests_vm_5.15.yml new file mode 100644 index 000000000..e226a0244 --- /dev/null +++ b/.github/workflows/pull_request_integration_tests_vm_5.15.yml @@ -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 diff --git a/.github/workflows/pull_request_integration_tests_vm_6.10.yml b/.github/workflows/pull_request_integration_tests_vm_6.10.yml new file mode 100644 index 000000000..df8a1bc62 --- /dev/null +++ b/.github/workflows/pull_request_integration_tests_vm_6.10.yml @@ -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 diff --git a/.github/workflows/workflow_integration_tests_vm.yml b/.github/workflows/workflow_integration_tests_vm.yml new file mode 100644 index 000000000..89700819d --- /dev/null +++ b/.github/workflows/workflow_integration_tests_vm.yml @@ -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