From fa9772805bc2abdd307ffd391aa0d45eb4e0f081 Mon Sep 17 00:00:00 2001 From: Andrea Panattoni Date: Fri, 6 Oct 2023 19:10:27 +0200 Subject: [PATCH] Add SRIOV Operator CI lane Add a Github Action lane to trigger the SRIOV Network Operator tests. This allows to verify if PR changes break any working scenario. Signed-off-by: Andrea Panattoni --- .github/workflows/buildtest.yml | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 736160202..46ef3d7c8 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -56,3 +56,56 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} file: test/coverage/lcov.info + + build-and-push-amd64-sriov-cni-on-pr: + name: Image Push AMD64 + runs-on: ubuntu-20.04 + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push sriov-cni + uses: docker/build-push-action@v4 + with: + context: . + push: true + platforms: linux/amd64 + tags: | + ghcr.io/${{ github.repository }}:${{ github.sha }} + file: ./Dockerfile + + virtual-k8s-cluster: + name: sriov operator k8s tests + needs: [ build-test,build-and-push-amd64-sriov-cni-on-pr ] + runs-on: [ sriov ] + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + repository: https://github.com/k8snetworkplumbingwg/sriov-network-operator + + - name: Set up Go 1.20 + uses: actions/setup-go@v3 + with: + go-version: 1.20.x + + - name: run test + run: make test-e2e-conformance-virtual-k8s-cluster-ci + env: + SRIOV_CNI_IMAGE=ghcr.io/${{ github.repository }}:${{ github.sha }} + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: k8s-artifact + path: ./k8s-artifacts