Add GHA to run MCS conformance tests #3747
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: End to End | |
on: | |
pull_request: | |
types: [labeled, opened, synchronize, reopened] | |
permissions: {} | |
jobs: | |
images: | |
name: Images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Build the images if necessary | |
uses: submariner-io/shipyard/gh-actions/cache-images@devel | |
# Both E2E jobs have the same name; the default job is un-suffixed, the full jobs are suffixed with their matrix combination | |
e2e-default: | |
name: E2E | |
needs: images | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Run E2E deployment and tests | |
uses: submariner-io/shipyard/gh-actions/e2e@devel | |
- name: Post mortem | |
if: failure() | |
uses: submariner-io/shipyard/gh-actions/post-mortem@devel | |
e2e-full: | |
name: E2E | |
needs: images | |
if: contains(github.event.pull_request.labels.*.name, 'ready-to-test') | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
deploytool: ['operator'] | |
globalnet: ['', 'globalnet'] | |
# Run most tests against the latest K8s version | |
k8s_version: ['1.29'] | |
include: | |
# Oldest Kubernetes version thought to work with SubM's Service Discovery. | |
# If this breaks, we may advance the oldest-working K8s version instead of fixing it. See: | |
# https://submariner.io/development/building-testing/ci-maintenance/ | |
- k8s_version: '1.21' | |
# Bottom of supported K8s version range | |
- k8s_version: '1.26' | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Run E2E deployment and tests | |
uses: submariner-io/shipyard/gh-actions/e2e@devel | |
with: | |
k8s_version: ${{ matrix.k8s_version }} | |
using: ${{ matrix.deploytool }} ${{ matrix.globalnet }} | |
- name: Post mortem | |
if: failure() | |
uses: submariner-io/shipyard/gh-actions/post-mortem@devel | |
conformance-test-clusterset-ip: | |
name: MCS Conformance - clusterset IP enabled | |
needs: images | |
timeout-minutes: 45 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Check out the mcs-api repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
ref: b49dd40c93c8792a6ff54f648eea575d85636a3b | |
repository: tpantelis/mcs-api | |
path: mcs-api | |
- name: Deploy Submariner | |
shell: bash | |
run: | | |
make deploy using="clusterset-ip" | |
- name: Run conformance tests | |
shell: bash | |
run: | | |
export KUBECONFIG=$(find $(git rev-parse --show-toplevel)/output/kubeconfigs/ -type f -printf %p:) | |
cd mcs-api/conformance | |
go test -v -timeout 30m -contexts cluster1,cluster2 -args -test.timeout 15m \ | |
--ginkgo.v --ginkgo.trace --ginkgo.label-filter "Required || EndpointSlice || DNS" | |
- name: Print report.html | |
if: always() | |
shell: bash | |
run: | | |
cat mcs-api/conformance/report.html | |
- name: Post mortem | |
if: failure() | |
uses: submariner-io/shipyard/gh-actions/post-mortem@devel | |
conformance-test-connectivity: | |
name: MCS Conformance - only connectivity | |
needs: images | |
timeout-minutes: 45 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Check out the mcs-api repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
ref: b49dd40c93c8792a6ff54f648eea575d85636a3b | |
repository: tpantelis/mcs-api | |
path: mcs-api | |
- name: Deploy Submariner | |
shell: bash | |
run: | | |
make deploy | |
- name: Run conformance tests with Connectivity | |
shell: bash | |
run: | | |
export KUBECONFIG=$(find $(git rev-parse --show-toplevel)/output/kubeconfigs/ -type f -printf %p:) | |
cd mcs-api/conformance | |
go test -v -timeout 30m -contexts cluster1,cluster2 -args -test.timeout 15m \ | |
--ginkgo.v --ginkgo.trace --ginkgo.label-filter "Connectivity" | |
- name: Print report.html | |
if: always() | |
shell: bash | |
run: | | |
cat mcs-api/conformance/report.html | |
- name: Post mortem | |
if: failure() | |
uses: submariner-io/shipyard/gh-actions/post-mortem@devel |