Skip to content

ipvlan: add "flag" option to select bridge, private or vepa #2109

ipvlan: add "flag" option to select bridge, private or vepa

ipvlan: add "flag" option to select bridge, private or vepa #2109

Workflow file for this run

---
name: test
on:
pull_request: {}
env:
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le riscv64 loong64"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: setup go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- uses: ibiqlik/action-yamllint@v3
with:
format: auto
- uses: golangci/golangci-lint-action@v9
with:
version: v2.14.0
args: -v
verify-modules:
name: Verify Go modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- name: Check Go modules
run: |
go mod tidy -diff
go mod verify
build:
name: Build all linux architectures
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: setup go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- name: Build on all supported architectures
run: |
set -e
for arch in ${LINUX_ARCHES}; do
echo "Building for arch $arch"
GOARCH=$arch ./build_linux.sh
rm bin/*
done
test-linux:
name: Run tests on Linux amd64
needs: build
runs-on: ubuntu-latest
steps:
- name: Install kernel modules
run: |
sudo apt-get update
kernel_release="$(uname -r)"
sudo apt-get install -y "linux-modules-${kernel_release}"
# Newer kernels include extra modules in the regular package.
if apt-cache show "linux-modules-extra-${kernel_release}" >/dev/null 2>&1; then
sudo apt-get install -y "linux-modules-extra-${kernel_release}"
fi
- name: Install nftables
# ensure that bridged traffic goes through netfilter
run: |
sudo apt-get install nftables
sudo modprobe br-netfilter
- name: Install dnsmasq(dhcp server)
run: |
sudo apt-get install dnsmasq
sudo systemctl disable --now dnsmasq
- uses: actions/checkout@v7
- name: setup go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: Install test binaries
run: |
go install github.com/containernetworking/cni/cnitool@latest
go install github.com/mattn/goveralls@latest
go install github.com/modocache/gover@latest
- name: test
run: PATH=$PATH:$(go env GOPATH)/bin COVERALLS=1 ./test_linux.sh
- name: Send coverage to coveralls
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$PATH:$(go env GOPATH)/bin
gover
goveralls -coverprofile=gover.coverprofile -service=github
test-win:
name: Build and run tests on Windows
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- name: setup go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- name: test
run: bash ./test_windows.sh