diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 4622dddd..bd7c7e6d 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -38,3 +38,30 @@ 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 + + - uses: actions/upload-artifact@v4 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-e2e-results + path: .output/*.xml diff --git a/Makefile b/Makefile index d6627701..e4930c64 100644 --- a/Makefile +++ b/Makefile @@ -69,8 +69,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