Skip to content

E2E tests: dump failure information #49

E2E tests: dump failure information

E2E tests: dump failure information #49

Workflow file for this run

name: CI
on:
merge_group:
pull_request:
paths-ignore:
- 'DCO'
- 'LICENSE'
- 'README.md'
branches:
- "main"
- "v**"
workflow_dispatch:
jobs:
static-security-analysis:
runs-on: ubuntu-22.04
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -exclude-dir e2etest -severity medium ./...
- name: Golang Vulncheck
uses: Templum/[email protected]
with:
skip-upload: true
commitlint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
unit-tests:
runs-on: ubuntu-22.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Unit Tests
run: |
make test
- name: Lint
run: |
ENV=host make lint
make bumplicense
go mod tidy
pushd e2etests
go mod tidy
popd
make manifests
make checkuncommitted
build-test-images:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
steps:
- name: Code checkout
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
- name: Build and export the image
uses: docker/build-push-action@v4
with:
context: .
tags: quay.io/metallb/frrk8s:dev-amd64
file: Dockerfile
outputs: type=docker,dest=/tmp/frrk8s.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Upload frrk8s artifact
uses: actions/upload-artifact@v3
with:
retention-days: 1
name: image-tar-frrk8s
path: /tmp/frrk8s.tar
e2e:
runs-on: ubuntu-22.04
needs:
- unit-tests
- build-test-images
- commitlint
strategy:
fail-fast: false
matrix:
ip-family: [ipv4, ipv6, dual]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install kernel modules
run: |
sudo apt-get update
sudo apt-get install linux-modules-extra-$(uname -r)
- name: Download frr8ks images
uses: actions/download-artifact@v3
with:
path: image
- name: Load image
working-directory: image
run: |
docker load -i image-tar-frrk8s/frrk8s.tar
- name: Deploy on kind
run: |
IP_FAMILY="${{ matrix.ip-family }}" IMG=quay.io/metallb/frrk8s:dev-amd64 make deploy
mkdir -p /tmp/kind_logs/
- name: E2E
run: |
SKIP="none"
if [ "${{ matrix.ip-family }}" == "ipv4" ]; then SKIP="$SKIP\|IPV6\|DUALSTACK"; fi
if [ "${{ matrix.ip-family }}" == "dual" ]; then SKIP="$SKIP\|IPV6"; fi
if [ "${{ matrix.ip-family }}" == "ipv6" ]; then SKIP="$SKIP\|IPV4\|DUALSTACK"; fi
GINKGO_ARGS="--skip $SKIP" TEST_ARGS="--report-path=/tmp/kind_logs" make e2etests
- name: Export kind logs
if: ${{ failure() }}
run:
make kind-export-logs
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: kind-logs-${{ matrix.ip-family }}