Skip to content

Migrate subnet cluster tag prefix and fix primary subnet exclusion logic #3131

Migrate subnet cluster tag prefix and fix primary subnet exclusion logic

Migrate subnet cluster tag prefix and fix primary subnet exclusion logic #3131

name: Automatic Pull Request test
on:
pull_request:
branches:
- "master"
- "release*"
- "sdkv2*"
permissions:
contents: read
jobs:
unit-test:
name: Unit test
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # refs/tags/v6.0.2
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # refs/tags/v6.4.0
with:
go-version: "1.25"
check-latest: true
- name: Set up tools
run: |
go install golang.org/x/lint/golint@latest
go install golang.org/x/tools/cmd/goimports@latest
# Install ginkgo version from go.mod
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
- name: Run code checks
run: |
make check-format
make vet
- name: Build
run: make build-linux
- name: Build tests
run: make build-test-binaries
- name: Helm lint
run: make helm-lint
- name: Unit test
run: make unit-test
- name: Upload code coverage
uses: codecov/codecov-action@79066c46f8dcdf8d7355f820dbac958c5b4cb9d3 # refs/tags/v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
docker-build-arch:
name: Build Docker images (${{ matrix.arch }})
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # refs/tags/v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # refs/tags/v4.0.0
- name: Build CNI image
run: make docker
docker-build:
name: Build Docker images
needs: docker-build-arch
runs-on: ubuntu-latest
steps:
- run: echo "All docker builds completed successfully"
docker-build-init-arch:
name: Build Docker init images (${{ matrix.arch }})
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # refs/tags/v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # refs/tags/v4.0.0
- name: Build CNI Init image
run: make docker-init
docker-build-init:
name: Build Docker init images
needs: docker-build-init-arch
runs-on: ubuntu-latest
steps:
- run: echo "All docker init builds completed successfully"