Skip to content

Bump actions/setup-go from 5 to 6 #899

Bump actions/setup-go from 5 to 6

Bump actions/setup-go from 5 to 6 #899

Workflow file for this run

#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 8 * * 0" # every sunday
jobs:
build-test:
strategy:
matrix:
go-version: [1.24.x]
os: [ubuntu-24.04]
goos: [linux]
goarch: [amd64, arm64, ppc64le]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Build test for ${{ matrix.goarch }}
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
run: GOARCH="${TARGET}" make build
- name: Go test
if: ${{ matrix.goarch }} == "amd64"
run: sudo make test-race # sudo needed for netns change in test
- name: Integration test for ${{ matrix.goarch }}
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
run: sudo FORCE_COLOR=true INT_TEST_SKIP_CLEANUP=true make test-integration
- name: Prepare integration-test archive
if: always()
# `actions/upload-artifact` step need the files to be readable and files can't have Colon (:)
run: |
sudo chmod -R a+rwx test/integration/tmp/*
find test/integration/tmp -name "*:*" -exec bash -c 'mv $0 ${0//:/_}' {} \;
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-integration- ${{ matrix.goarch }}
path: ./test/integration/tmp/
coverage:
runs-on: ubuntu-24.04
needs: build-test
name: coverage
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.24.x
- name: Check out code
uses: actions/checkout@v4
- name: Go test with coverage
run: sudo make test-coverage test-integration merge-test-coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: test/coverage/cover.out
format: golang
sriov-operator-e2e-test:
name: SR-IOV operator e2e tests
needs: [ build-test ]
runs-on: [ sriov ]
env:
TEST_REPORT_PATH: k8s-artifacts
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: build sriov-cni image
run: podman build -t ghaction-sriov-cni:pr-${{github.event.pull_request.number}} .
- name: Check out sriov operator's code
uses: actions/checkout@v4
with:
repository: k8snetworkplumbingwg/sriov-network-operator
path: sriov-network-operator-wc
ref: master
- name: run test
run: make test-e2e-conformance-virtual-k8s-cluster-ci
working-directory: sriov-network-operator-wc
env:
LOCAL_SRIOV_CNI_IMAGE: ghaction-sriov-cni:pr-${{github.event.pull_request.number}}
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ env.TEST_REPORT_PATH }}
path: ./sriov-network-operator-wc/${{ env.TEST_REPORT_PATH }}