diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 376b2a406..bb9fef974 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -37,3 +37,64 @@ jobs: fail_ci_if_error: true verbose: true + kubernetes-integration-tests: + needs: [build, build-go, build-docs] + runs-on: ubuntu-latest + env: + BPFMAN_IMG: quay.io/bpfman/bpfman:latest + BPFMAN_AGENT_IMG: quay.io/bpfman/bpfman-agent:int-test + BPFMAN_OPERATOR_IMG: quay.io/bpfman/bpfman-operator:int-test + XDP_PASS_PRIVATE_IMAGE_CREDS: ${{ secrets.XDP_PASS_PRIVATE_IMAGE_CREDS }} + steps: + - name: Check disk space + run: df -h + + - name: Free up space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/local/lib/android + + - name: Check disk space again + run: df -h + + - name: setup golang + uses: actions/setup-go@v5 + with: + # prettier-ignore + go-version: ${{ matrix.go }} # yamllint disable-line rule:quoted-strings + + - name: cache go modules + uses: actions/cache@v4 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-build-codegen- + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + ## TODO(astoycos) Currently this is just done to ensure we have coverage + ## on all image builds. Ultimately we should be running the integration + ## tests with these locally built bytecode images. + - name: build images + run: make build-images + + - name: run integration tests + run: make test-integration + + - name: Check disk space + run: df -h + + ## Upload diagnostics if integration test step failed. + - name: upload diagnostics + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: kubernetes-integration-test-diag + path: /tmp/ktf-diag* + if-no-files-found: ignore diff --git a/test/integration/suite_test.go b/test/integration/suite_test.go index b935ff1e2..ab182c89d 100644 --- a/test/integration/suite_test.go +++ b/test/integration/suite_test.go @@ -33,9 +33,9 @@ var ( bpfmanImage = os.Getenv("BPFMAN_IMG") bpfmanAgentImage = os.Getenv("BPFMAN_AGENT_IMG") bpfmanOperatorImage = os.Getenv("BPFMAN_OPERATOR_IMG") - tcExampleUsImage = "quay.io/bpfman-userspace/go-tc-counter:latest" - xdpExampleUsImage = "quay.io/bpfman-userspace/go-xdp-counter:latest" - tpExampleUsImage = "quay.io/bpfman-userspace/go-tracepoint-counter:latest" + tcExampleUsImage = "quay.io/organization/bpfman-userspace/go-tc-counter:latest" + xdpExampleUsImage = "quay.io/organization/bpfman-userspace/go-xdp-counter:latest" + tpExampleUsImage = "quay.io/organization/bpfman-userspace/go-tracepoint-counter:latest" existingCluster = os.Getenv("USE_EXISTING_KIND_CLUSTER") keepTestCluster = func() bool { return os.Getenv("TEST_KEEP_CLUSTER") == "true" || existingCluster != "" }()