Skip to content

Commit

Permalink
ci: add Go e2e test for new project layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
estroz committed May 26, 2020
1 parent 31ad46c commit a1c9fb9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
21 changes: 19 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ jobs:
name: Subcommands on Kubernetes
script: make test-subcommand

# Build and test go
# Build and test go for current project layouts
- <<: *test
name: Go on Kubernetes
name: Go for current project layouts on Kubernetes
before_script:
- (cd / && go get github.com/mattn/goveralls)
script:
Expand All @@ -148,6 +148,23 @@ jobs:
name: Helm on Kubernetes
script: make test-e2e-helm

# Build and test go for new project layouts
- name: Go for new project layouts on Kubernetes
before_install:
# hack/ci/check-doc-only-update.sh needs to be sourced so
# that it can properly exit the test early with success
- source hack/ci/check-doc-only-update.sh
script:
- make test-e2e-go-new
after_success:
- echo "E2E tests passed"
after_failure:
- echo "E2E tests failed"
- kubectl get all --all-namespaces
- kubectl get events --all-namespaces --field-selector=type=Warning
services:
- docker

## Image deploy/push stage jobs ##

# Build and deploy arm64 ansible-operator docker image
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,17 @@ test-subcommand-scorecard:
test-subcommand-olm-install:
./hack/tests/subcommand-olm-install.sh

# E2E and integration tests.
.PHONY: test-e2e test-e2e-go test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm test-integration
# E2E tests.
.PHONY: test-e2e test-e2e-go test-e2e-go-new test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm

test-e2e: test-e2e-go test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm ## Run the e2e tests
test-e2e: test-e2e-go test-e2e-go-new test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm ## Run the e2e tests

test-e2e-go:
./hack/tests/e2e-go.sh $(ARGS)

test-e2e-go-new:
K8S_VERSION=$(K8S_VERSION) ./hack/tests/e2e-go-new.sh

test-e2e-ansible: image-build-ansible
./hack/tests/e2e-ansible.sh

Expand All @@ -260,5 +263,8 @@ test-e2e-ansible-molecule: image-build-ansible
test-e2e-helm: image-build-helm
./hack/tests/e2e-helm.sh

test-integration:
# Integration tests.
.PHONY: test-integration

test-integration: ## Run integration tests
./hack/tests/integration.sh

0 comments on commit a1c9fb9

Please sign in to comment.