From 2f56d62c1c093779ef8a34669c65bfef7d30aaf9 Mon Sep 17 00:00:00 2001 From: Enrique Llorente Date: Mon, 10 Jun 2024 12:59:41 +0200 Subject: [PATCH] gh: Add e2e job Signed-off-by: Enrique Llorente --- .github/workflows/checks.yaml | 30 ++++++++++++++++++++++++++++++ Makefile | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 4622dddd..c800d252 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -38,3 +38,33 @@ jobs: - name: Test run: ENVTEST_VERSION="release-0.17" make test + e2e: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' + + - name: Start cluster + env: + KIND_ALLOW_SYSTEM_WRITES: true + run: make cluster-up + + - name: Sync cluster + run: make cluster-sync + + - name: Run e2e tests + run: make test-e2e + + - name: E2E Test Report + uses: dorny/test-reporter@v1 + if: always() + with: + name: Ginkgo Tests + path: .output/*.xml + reporter: java-junit + fail-on-error: true diff --git a/Makefile b/Makefile index f040d51c..8645fe98 100644 --- a/Makefile +++ b/Makefile @@ -70,8 +70,9 @@ test: manifests generate fmt vet envtest ## Run tests. test-e2e: export KUBECONFIG=$$(pwd)/.output/kubeconfig && \ export PATH=$$(pwd)/.output/ovn-kubernetes/bin:$${PATH} && \ + export REPORT_PATH=$$(pwd)/.output/ && \ cd test/e2e && \ - go test -v --ginkgo.v + go test -v --ginkgo.v --ginkgo.junit-report=$${REPORT_PATH}/test-e2e.junit.xml .PHONY: lint lint: golangci-lint ## Run golangci-lint linter & yamllint