diff --git a/cloudbuild.yml b/cloudbuild.yml index b73fde4dc5f..482c4dd4d73 100644 --- a/cloudbuild.yml +++ b/cloudbuild.yml @@ -100,16 +100,6 @@ steps: waitFor: ['find-affected-packages'] env: ['NIGHTLY=$_NIGHTLY'] -# Integration tests -- name: 'node:10' - dir: 'tfjs-core' - id: 'test-integration' - entrypoint: 'yarn' - args: ['test-integration'] - waitFor: ['find-affected-packages'] - env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] - secretEnv: ['BROWSERSTACK_KEY'] - # Release notes test - name: 'node:10' id: 'test-monorepo' @@ -118,10 +108,6 @@ steps: waitFor: ['yarn'] # General settings. -secrets: -- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc - secretEnv: - BROWSERSTACK_KEY: CiQAkwyoIW0LcnxymzotLwaH4udVTQFBEN4AEA5CA+a3+yflL2ASPQAD8BdZnGARf78MhH5T9rQqyz9HNODwVjVIj64CTkFlUCGrP1B2HX9LXHWHLmtKutEGTeFFX9XhuBzNExA= timeout: 3600s logsBucket: 'gs://tfjs-build-logs' options: diff --git a/tfjs-core/package.json b/tfjs-core/package.json index fb4c93df292..e505979d297 100644 --- a/tfjs-core/package.json +++ b/tfjs-core/package.json @@ -71,7 +71,6 @@ "test-node-ci": "node dist/test_node.js", "test-async-backends": "rimraf dist/ && tsc && node dist/test_async_backends.js", "test-async-backends-ci": "node dist/test_async_backends.js", - "test-integration": "yarn && ./scripts/test-integration.js", "test-ci": "./scripts/test-ci.sh", "test-snippets": "ts-node ./scripts/test_snippets/test_snippets.ts" }, diff --git a/tfjs-core/scripts/cloud_funcs/README.md b/tfjs-core/scripts/cloud_funcs/README.md index ef27afbd157..2d56e9e01ec 100644 --- a/tfjs-core/scripts/cloud_funcs/README.md +++ b/tfjs-core/scripts/cloud_funcs/README.md @@ -12,7 +12,7 @@ gcloud functions deploy nightly \ ``` If a build was triggered by nightly, there is a substitution variable `_NIGHTLY=true`. -You can forward the substitution as the `NIGHTLY` environment variable so the scripts can use it, by specifying `env: ['NIGHTLY=$_NIGHTLY']` in `cloudbuild.yml`. E.g. `test-integration` uses the `NIGHTLY` bit to always run on nightly. +You can forward the substitution as the `NIGHTLY` environment variable so the scripts can use it, by specifying `env: ['NIGHTLY=$_NIGHTLY']` in `cloudbuild.yml`. ### `send_email` Sends an email and a chat message with the nightly build status. Every build sends a message to the `cloud-builds` topic with its build information. The `send_email` function is subscribed to that topic and ignores all builds (e.g. builds triggered by pull requests) **except** for the nightly build and sends an email to an internal mailing list with its build status around 3:10am. diff --git a/tfjs-core/scripts/test-integration.js b/tfjs-core/scripts/test-integration.js deleted file mode 100755 index 09cb0a3ecaf..00000000000 --- a/tfjs-core/scripts/test-integration.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node -// Copyright 2019 Google LLC. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ============================================================================= - -const {exec} = require('../../scripts/test-util'); -const fs = require('fs'); - - -function shouldRunIntegration() { - if (process.env.NIGHTLY === 'true') { - return true; - } - const diffFile = 'run-ci'; - if (!fs.existsSync(diffFile)) { - return false; - } - let diffContents = `${fs.readFileSync(diffFile)}`; - if (diffContents.indexOf('src/version.ts') === -1) { - return false; - } - return true; -} - -if (shouldRunIntegration()) { - exec('./scripts/test-integration.sh'); -} diff --git a/tfjs-core/scripts/test-integration.sh b/tfjs-core/scripts/test-integration.sh deleted file mode 100755 index 8a7c9f86cf0..00000000000 --- a/tfjs-core/scripts/test-integration.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2018 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================= - -function print_status() { - name=$1 - code=$2 - echo -e "$name:" $([[ $code -eq 0 ]] && echo 'PASS' || echo 'FAIL') $3 -} - -echo '######################' -echo 'Nightly build or version.ts was modified.' -echo 'Testing layers/converter/node/data against tfjs-core@master.' -echo '######################' -yarn build && yarn build-test-snippets - -echo 'Testing layers' -cd ../tfjs-layers -yarn test-ci -LAYERS_EXIT_CODE=$? - -echo 'Testing node' -cd ../tfjs-node -yarn test-ci -NODE_EXIT_CODE=$? - -echo 'Testing wasm' -cd ../tfjs-backend-wasm -yarn test-ci -WASM_EXIT_CODE=$? - -echo 'Testing converter' -cd ../tfjs-converter -yarn test-ci -CONVERTER_EXIT_CODE=$? - -echo 'Testing data' -cd ../tfjs-data -yarn test-ci -DATA_EXIT_CODE=$? - -echo '==== INTEGRATION TEST RESULTS ====' -print_status "tfjs-layers" "$LAYERS_EXIT_CODE" -print_status "tfjs-node" "$NODE_EXIT_CODE" -print_status "tfjs-backend-wasm" "$WASM_EXIT_CODE" -print_status "tfjs-converter" "$CONVERTER_EXIT_CODE" -print_status "tfjs-data" "$DATA_EXIT_CODE" -echo '==================================' - -RED='\033[0;31m' -BLUE='\e[34m' -NC='\033[0m' # No Color -FINAL_EXIT_CODE=$(($LAYERS_EXIT_CODE+$NODE_EXIT_CODE+$CONVERTER_EXIT_CODE+$DATA_EXIT_CODE)) -[[ $FINAL_EXIT_CODE -eq 0 ]] && COLOR=$BLUE || COLOR=$RED -print_status "${COLOR}Final result" "$FINAL_EXIT_CODE" "$NC" -exit $FINAL_EXIT_CODE