Skip to content

Commit

Permalink
Add a CI lane with e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Paolinelli <[email protected]>
  • Loading branch information
fedepaol committed Jun 28, 2023
1 parent 687feea commit cc3bb42
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,49 @@ jobs:
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: E2E
run: |
IP_FAMILY="${{ matrix.ip-family }}"
IP_FAMILY=$IP_FAMILY make kind-cluster
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
make deploy
GINKGO_ARGS="--skip $SKIP" make e2etests
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: kind-logs-${{ matrix.ip-family }}
21 changes: 21 additions & 0 deletions .github/workflows/composite/collectlogs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "collectlogs"
description: "Collect and upload the logs"

inputs:
artifact-name:
description: "the name of artifacts to store"
required: true

runs:
using: "composite"
steps:
- name: Log permissions
shell: bash
run: |
sudo chmod -R o+r /tmp/kind_logs
- name: Upload logs
uses: actions/upload-artifact@v2
with:
name: ${{ inputs.artifact-name }}
path: /tmp/kind_logs/

0 comments on commit cc3bb42

Please sign in to comment.