Skip to content

Commit

Permalink
Add GHA to run MCS conformance tests
Browse files Browse the repository at this point in the history
The GHA clones the "sigs.k8s.io/mcs-api" repo with the desired commit
and runs `go test` directly in the directory. "v0.1.0"  doesn't have
the conformance tests so we can't run them via Go import and trying to
import a later commit is problematic due  incompatible changes to the
MCS APIs. Also the conformance tests are really tied to the MCS spec
and not specifically to the API version so they'll likely evolve
separately anyway.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Nov 22, 2024
1 parent 8831d1b commit eb6abef
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,41 @@ jobs:
- name: Post mortem
if: failure()
uses: submariner-io/shipyard/gh-actions/post-mortem@devel
conformance-test:
name: MCS Conformance
needs: images
timeout-minutes: 30
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: 92bf69aa5d1d144ea740d1412f9bf341879adfad
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

0 comments on commit eb6abef

Please sign in to comment.