github user-name changed #1
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
name: e2e tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
setup: | |
name: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.work | |
- name: Install dependencies | |
run: | | |
go version | |
go install golang.org/x/lint/golint@master | |
e2e: | |
name: e2e | |
needs: setup | |
runs-on: ubuntu-latest | |
timeout-minutes: 100 | |
strategy: | |
fail-fast: false | |
matrix: | |
ipFamily: ["ipv4", "ipv6", "dual"] | |
backend: ["iptables", "ipvs", "nft", "ebpf", "userspacelin"] | |
exclude: | |
- ipFamily: "ipv6" | |
backend: "ebpf" | |
- ipFamily: "dual" | |
backend: "ebpf" | |
- ipFamily: "ipv6" | |
backend: "userspacelin" | |
- ipFamily: "dual" | |
backend: "userspacelin" | |
env: | |
JOB_NAME: "kpng-e2e-${{ matrix.ipFamily }}-${{ matrix.backend }}" | |
IP_FAMILY: ${{ matrix.ipFamily }} | |
BACKEND: ${{ matrix.backend }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup ebpf backend dependencies | |
run: | | |
if [[ ${{ env.BACKEND }} == "ebpf" ]]; then | |
export GOBIN=$(go env GOPATH)/bin | |
export PATH=$PATH:$GOBIN | |
echo "PATH=$PATH" >> $GITHUB_ENV | |
go install github.com/cilium/ebpf/cmd/[email protected] | |
sudo apt-get update && sudo apt-get install -y clang llvm libelf-dev libpcap-dev gcc-multilib build-essential | |
fi | |
- name: initialize ipvs module via ipvsadm | |
run: | | |
if [[ ${{ env.BACKEND }} == "ipvs" ]]; then | |
sudo apt-get update && sudo apt-get install ipvsadm && sudo ipvsadm -L | |
fi | |
- name: run e2e tests | |
run: ./hack/test_e2e.sh -i ${{ env.IP_FAMILY }} -b ${{ env.BACKEND }} -c -n 1 -S | |
- name: Export logs | |
if: always() | |
run: | | |
./hack/e2e_export_logs.sh | |
- name: Upload Junit Reports | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kind-junit-${{ env.JOB_NAME }}-${{ github.run_id }} | |
path: './hack/temp/e2e/artifacts/reports/*.xml' | |
- name: Upload logs | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} | |
path: ./hack/temp/e2e/artifacts/logs/ | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: './hack/temp/e2e/artifacts/reports/*.xml' |