Skip to content

Commit

Permalink
gh: Add e2e job
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Llorente <ellorent@redhat.com>
  • Loading branch information
qinqon committed Jun 11, 2024
1 parent b92be91 commit e256516
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e256516

Please sign in to comment.