You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/07/26 08:16:04 UTC
[camel-k] branch main updated: chore(ci): smoke test subset only
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new c45027ad5 chore(ci): smoke test subset only
c45027ad5 is described below
commit c45027ad57bacbc4046884fde5fb6e2687c94a93
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Jul 26 09:35:32 2023 +0200
chore(ci): smoke test subset only
---
.github/actions/e2e-common/action.yml | 5 +++++
.github/actions/e2e-common/exec-tests.sh | 7 ++++++-
.github/actions/release-nightly/action.yml | 1 +
script/Makefile | 23 +++++++++++++++++++++++
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/.github/actions/e2e-common/action.yml b/.github/actions/e2e-common/action.yml
index f4dcfc303..b96e2921e 100644
--- a/.github/actions/e2e-common/action.yml
+++ b/.github/actions/e2e-common/action.yml
@@ -29,6 +29,10 @@ inputs:
description: 'Indicates whether the advanced common integration tests should be launched (default false)'
default: 'false'
required: false
+ smoke-test-only:
+ description: 'Only run a subset of tests'
+ default: 'false'
+ required: false
runs:
using: "composite"
@@ -124,6 +128,7 @@ runs:
-s "${{steps.config-cluster.outputs.cluster-image-registry-insecure }}" \
-v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" \
-x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}" \
+ -y "${{ inputs.smoke-test-only }}" \
-z "${{ inputs.with-custom-install }}"
- name: Cleanup
diff --git a/.github/actions/e2e-common/exec-tests.sh b/.github/actions/e2e-common/exec-tests.sh
index bf533d958..100da5802 100755
--- a/.github/actions/e2e-common/exec-tests.sh
+++ b/.github/actions/e2e-common/exec-tests.sh
@@ -57,6 +57,9 @@ while getopts ":b:c:g:i:l:n:q:s:v:x:z:" opt; do
x)
SAVE_FAILED_TEST_NS=${OPTARG}
;;
+ y)
+ SMOKE_TEST_ONLY=${OPTARG}
+ ;;
z)
CUSTOM_INSTALL_TEST=${OPTARG}
;;
@@ -137,7 +140,9 @@ fi
# Then run all integration tests rather than ending on first failure
set -e
exit_code=0
-if [ "${CUSTOM_INSTALL_TEST}" == "true" ]; then
+if [ "${SMOKE_TEST_ONLY}" == "true" ]; then
+ DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-smoke || exit_code=1
+elif [ "${CUSTOM_INSTALL_TEST}" == "true" ]; then
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-common-with-custom-install || exit_code=1
else
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-common || exit_code=1
diff --git a/.github/actions/release-nightly/action.yml b/.github/actions/release-nightly/action.yml
index 00d8bc186..4abb219d6 100644
--- a/.github/actions/release-nightly/action.yml
+++ b/.github/actions/release-nightly/action.yml
@@ -55,6 +55,7 @@ runs:
with:
cluster-config-data: ${{ inputs.secretE2ECluster }}
cluster-kube-config-data: ${{ inputs.secretE2EKube }}
+ smoke-test-only: true
- name: Cache modules
uses: actions/cache@v3
with:
diff --git a/script/Makefile b/script/Makefile
index 57711d31e..d9f3b89f5 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -271,6 +271,29 @@ test-common: do-build
go test -timeout 10m -v ./e2e/common/support/teardown_test.go -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
exit $${FAILED}
+#
+# Smoke tests are a subset of common tests used to quickly verify the operator
+#
+test-smoke: do-build
+ FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
+ go test -timeout 10m -v ./e2e/common/support/startup_test.go -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
+ go test -timeout 30m -v ./e2e/common/languages -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
+ go test -timeout 30m -v \
+ ./e2e/common/misc/default.go \
+ ./e2e/common/misc/cron_test.go \
+ ./e2e/common/misc/kamelet_test.go \
+ ./e2e/common/misc/pipe_test.go \
+ -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
+ go test -timeout 30m -v \
+ ./e2e/common/traits/default.go \
+ ./e2e/common/traits/camel_test.go \
+ ./e2e/common/traits/container_test.go \
+ ./e2e/common/traits/openapi_test.go \
+ ./e2e/common/traits/service_test.go \
+ -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
+ go test -timeout 10m -v ./e2e/common/support/teardown_test.go -tags=integration $(TEST_INTEGRATION_COMMON_LANG_RUN) $(GOTESTFMT) || FAILED=1; \
+ exit $${FAILED}
+
#
# Common tests that require some particular operator setting or need to be installed in multiple namespaces
#