Skip to content

Commit

Permalink
Add SRIOV Operator CI lane
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zeeke committed Oct 9, 2023
1 parent f0e62c3 commit 69a683a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: PR 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 }}:pr-${{github.event.pull_request.number}}
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 }}:pr-${{github.event.pull_request.number}}

- uses: actions/upload-artifact@v3
if: always()
with:
name: k8s-artifact
path: ./k8s-artifacts

0 comments on commit 69a683a

Please sign in to comment.