Go-build-and-test-amd64 #633
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Originally from https://raw.githubusercontent.com/intel/multus-cni/master/.github/workflows/go-build-test-amd64.yml | |
name: Go-build-and-test-amd64 | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 10 * * *" # everyday at 10 am | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go-version: [1.20.x, 1.21.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
GO111MODULE: on | |
TARGET: amd64 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Build | |
run: GOARCH="${TARGET}" ./scripts/build.sh | |
- name: Go test | |
run: ./scripts/test.sh | |
sriov-operator-e2e-test: | |
name: SR-IOV operator e2e tests | |
needs: [ build ] | |
runs-on: [ sriov ] | |
env: | |
TEST_REPORT_PATH: k8s-artifacts | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: build network resource injector image | |
run: podman build -f Dockerfile -t ghaction-network-resource-injector:pr-${{github.event.pull_request.number}} . | |
- name: Check out sriov operator's code | |
uses: actions/checkout@v2 | |
with: | |
repository: k8snetworkplumbingwg/sriov-network-operator | |
path: sriov-network-operator-wc | |
- name: run test | |
run: make test-e2e-conformance-virtual-k8s-cluster-ci | |
working-directory: sriov-network-operator-wc | |
env: | |
LOCAL_NETWORK_RESOURCES_INJECTOR_IMAGE: ghaction-network-resource-injector:pr-${{github.event.pull_request.number}} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: ${{ env.TEST_REPORT_PATH }} | |
path: ./sriov-network-operator-wc/${{ env.TEST_REPORT_PATH }} |