diff --git a/.kokoro/.mocharc.yml b/.kokoro/.mocharc.yml new file mode 100644 index 0000000000..5c2a08dc2b --- /dev/null +++ b/.kokoro/.mocharc.yml @@ -0,0 +1,3 @@ +reporter: xunit +reporter-option: + - output=./sponge_log.xml diff --git a/.kokoro/appengine/common.cfg b/.kokoro/appengine/common.cfg index 5b6a28efc5..94b10385ef 100644 --- a/.kokoro/appengine/common.cfg +++ b/.kokoro/appengine/common.cfg @@ -13,11 +13,4 @@ build_file: "nodejs-docs-samples/.kokoro/trampoline.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-docs-samples/.kokoro/build.sh" -} - -# Export XUnit test results for further analysis -action { - define_artifacts { - regex: "**/all-tests.xml" - } } \ No newline at end of file diff --git a/.kokoro/build-with-appengine.sh b/.kokoro/build-with-appengine.sh index 5cc73c220e..0e925eaf4b 100755 --- a/.kokoro/build-with-appengine.sh +++ b/.kokoro/build-with-appengine.sh @@ -18,6 +18,11 @@ set -e; export GCLOUD_PROJECT=nodejs-docs-samples-tests +# Activate mocha config +pushd github/nodejs-docs-samples +mv .kokoro/.mocharc.yml . +popd + # Update gcloud gcloud components update --quiet diff --git a/.kokoro/build-with-run.sh b/.kokoro/build-with-run.sh index 5b0a01426e..d25d8b66f0 100755 --- a/.kokoro/build-with-run.sh +++ b/.kokoro/build-with-run.sh @@ -16,6 +16,11 @@ set -eo pipefail +# Activate mocha config +pushd github/nodejs-docs-samples +mv .kokoro/.mocharc.yml . +popd + export GOOGLE_CLOUD_PROJECT=nodejs-docs-samples-tests pushd github/nodejs-docs-samples/${PROJECT} diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2d38c5f838..56ee3b1fae 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,6 +71,11 @@ export NODEJS_IOT_RSA_PUBLIC_CERT=${KOKORO_GFILE_DIR}/rsa_cert.pem export BOT_ACCESS_TOKEN=${KOKORO_GFILE_DIR}/secrets-slack-bot-access-token.txt export CHANNEL=${KOKORO_GFILE_DIR}/secrets-slack-channel-id.txt +# Activate mocha config +pushd github/nodejs-docs-samples +mv .kokoro/.mocharc.yml . +popd + cd github/nodejs-docs-samples/${PROJECT} # Install dependencies diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index 3e09e3a430..6fa7e084d8 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -13,4 +13,11 @@ build_file: "nodejs-docs-samples/.kokoro/trampoline.sh" env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" +} + +# Export XUnit test results for further analysis +action { + define_artifacts { + regex: "**/sponge_log.xml" + } } \ No newline at end of file diff --git a/.kokoro/functions/common.cfg b/.kokoro/functions/common.cfg index 73ca2ffca1..a0ffd6fe31 100644 --- a/.kokoro/functions/common.cfg +++ b/.kokoro/functions/common.cfg @@ -19,11 +19,4 @@ env_vars: { env_vars: { key: "BASE_URL" value: "http://localhost:8080" -} - -# Export XUnit test results for further analysis -action { - define_artifacts { - regex: "**/all-tests.xml" - } } \ No newline at end of file