Automated backport of #1338: Add OVN IC CI #1351: Fix OVN Image #1373: Use a specific OVNK commit #345
Workflow file for this run
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: Testing | |
on: | |
pull_request: | |
permissions: {} | |
env: | |
DEBUG_PRINT: true | |
jobs: | |
build-multiarch-images: | |
name: Build multi-arch images | |
needs: images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Set up QEMU (to support building on non-native architectures) | |
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 | |
- name: Set up buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Build the multi-arch images | |
run: make multiarch-images | |
- name: Check that we actually built multi-arch images | |
run: bash -c '[ "$(echo package/*.tar)" != "package/*.tar" ]' | |
clean-clusters: | |
name: Clean up clusters | |
needs: images | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Deploy clusters | |
run: make clusters TIMEOUT=1m | |
- name: Clean up clusters | |
run: make clean-clusters | |
- name: Check that clusters are gone | |
run: test "$(kind get clusters 2>&1)" = "No kind clusters found." | |
clean-generated: | |
name: Clean up generated files | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Build images | |
run: make images | |
- name: Clean up generated files | |
run: make clean-generated | |
- name: Check that image markers are gone | |
run: test package/.image.* = "package/.image.*" | |
clusters: | |
name: Clusters | |
needs: images | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Deploy clusters | |
run: make clusters TIMEOUT=1m | |
- name: Post mortem | |
if: failure() | |
uses: ./gh-actions/post-mortem | |
compilation: | |
name: Compilation | |
needs: images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Test the compile.sh script | |
run: make script-test SCRIPT_TEST_ARGS="test/scripts/compile/test.sh" | |
deployment: | |
name: Deployment | |
needs: images | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
globalnet: ['', 'globalnet'] | |
deploytool: ['operator', 'helm'] | |
extra-toggles: [''] | |
include: | |
- extra-toggles: air-gap | |
- extra-toggles: air-gap | |
globalnet: globalnet | |
- extra-toggles: air-gap | |
lighthouse: lighthouse | |
- extra-toggles: air-gap | |
ovn: ovn | |
- extra-toggles: dual-stack | |
- extra-toggles: ovn | |
- deploytool: operator | |
extra-toggles: lighthouse | |
- deploytool: helm | |
extra-toggles: lighthouse | |
- extra-toggles: load-balancer | |
- extra-toggles: prometheus | |
steps: | |
- name: Reclaim space on GHA host (if the job needs it) | |
if: ${{ matrix.ovn != '' }} | |
run: rm -rf /usr/share/dotnet | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
with: | |
submodules: true | |
- name: Fetch all git tags | |
run: git fetch origin +refs/tags/*:refs/tags/* | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Deploy clusters and Submariner | |
run: make deploy using="${{ matrix.globalnet }} ${{ matrix.deploytool }} ${{ matrix.extra-toggles }}" TIMEOUT=1m | |
- name: Post mortem | |
if: failure() | |
uses: ./gh-actions/post-mortem | |
e2e: | |
name: E2E | |
needs: images | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Run E2E deployment and tests | |
run: make e2e | |
- name: Post mortem | |
if: failure() | |
uses: ./gh-actions/post-mortem | |
images: | |
name: Images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Build the images if necessary | |
uses: ./gh-actions/cache-images | |
mutliple-gateways-support: | |
name: Multiple gateways support | |
needs: images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Deploy clusters and test cloud-prepare | |
run: make script-test SCRIPT_TEST_ARGS="test/scripts/cloud-prepare/test.sh" | |
post-mortem: | |
name: Post mortem | |
needs: images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Deploy some clusters | |
run: make clusters | |
- name: Test the post_mortem.sh script | |
run: make script-test SCRIPT_TEST_ARGS="test/scripts/post_mortem/test.sh" | |
unit: | |
name: Unit tests | |
needs: images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Restore images from the cache | |
uses: ./gh-actions/restore-images | |
- name: Running `make unit` is expected to pass | |
run: make unit | |
- name: Running `make unit` is expected to fail | |
run: sh -c '! make unit TEST_ARGS="--fail"' |