Skip to content

chore(deps): update alpine docker tag to v3.22 #217

chore(deps): update alpine docker tag to v3.22

chore(deps): update alpine docker tag to v3.22 #217

name: Pull request integration tests on VM
on:
push:
branches: ["main", "release-*"]
paths:
- ".github/workflows/workflow_integration_tests_vm.yml"
- "bpf/**"
- "internal/test/integration/**"
- "internal/test/vm/**"
- "scripts/generate-integration-matrix.sh"
pull_request:
branches: ["main", "release-*"]
paths:
- ".github/workflows/workflow_integration_tests_vm.yml"
- "bpf/**"
- "internal/test/integration/**"
- "internal/test/vm/**"
- "scripts/generate-integration-matrix.sh"
permissions:
contents: read
jobs:
vm-test-matrix:
name: "Build VM integration matrix"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: build matrix
id: build-matrix
env:
# 3 partitions, one for each of:
# TestMultiProcess, TestMultiProcessAppCP, TestMultiProcessAppCPNoIP
PARTITIONS: 3
TEST_TAGS: integration
run: |
echo -n "matrix=" >> $GITHUB_OUTPUT
make vm-integration-test-matrix-json >> $GITHUB_OUTPUT
test:
name: kernel ${{ matrix.kernel.kernel-version }} ${{ matrix.kernel.arch }} ${{ matrix.test.description }}
needs: vm-test-matrix
permissions:
# Required for codecov
checks: write
pull-requests: write
# Required for uploading artifacts
actions: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kernel:
- kernel-version: "5.15.152"
arch: "x86_64"
- kernel-version: "6.10.6"
arch: "x86_64"
test: ${{ fromJson(needs.vm-test-matrix.outputs.matrix).include }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: "go.mod"
cache: false
- name: Generate files
run: make prereqs docker-generate
- name: Install QEMU and musl-tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends qemu-utils qemu-system-x86 musl-tools
- name: Pre-compile Go integration tests
run: |
mkdir compiled-tests
CC=musl-gcc CGO_ENABLED=1 go test -c -tags=integration -ldflags="-s -w" -o compiled-tests/ ./internal/test/integration/...
- name: Run VM integration tests (${{ matrix.test.description }})
timeout-minutes: 60
env:
# zizmor template-injection fixes: pass data as env vars
MATRIX_ID: ${{ matrix.test.id }}
MATRIX_JSON: ${{ toJson(matrix.test) }}
MATRIX_TEST_PATTERN: ${{ matrix.test.test_pattern }}
RUN_NUMBER: ${{ github.run_number }}
ARCH: ${{ matrix.kernel.arch }}
KERNEL_VERSION: ${{ matrix.kernel.kernel-version }}
run: |
echo "VM Partition for kernel $KERNEL_VERSION"
echo "${MATRIX_JSON}"
if [ -z "${MATRIX_TEST_PATTERN}" ]; then
echo "Error: Test pattern is empty for shard $MATRIX_ID"
exit 1
fi
# Run VM tests with pre-compiled tests
sudo make -C internal/test/vm \
KERNEL_VER=${KERNEL_VERSION} \
ARCH=${ARCH} \
TEST_PATTERN="${MATRIX_TEST_PATTERN}" \
RUN_NUMBER="${RUN_NUMBER}" \
PRECOMPILED_TESTS_DIR="$(pwd)/compiled-tests" \
&& [ -f testoutput/success ]
- name: Process coverage data
run: make itest-coverage-data
- name: Report coverage
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
ARCH: ${{ matrix.kernel.arch }}
KERNEL_VERSION: ${{ matrix.kernel.kernel-version }}
with:
files: ./testoutput/itest-covdata.txt
flags: integration-test-vm-${ARCH}-${KERNEL_VERSION}
- name: Upload integration test logs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: vm-test-logs-${{ github.run_number }}-${{ matrix.kernel.kernel-version }}-${{ matrix.test.id }}
path: |
testoutput/*.log
testoutput/kind