diff --git a/tfjs-backend-cpu/cloudbuild.yml b/tfjs-backend-cpu/cloudbuild.yml index bbf1c2bd3e6..28d68268125 100644 --- a/tfjs-backend-cpu/cloudbuild.yml +++ b/tfjs-backend-cpu/cloudbuild.yml @@ -5,7 +5,7 @@ steps: entrypoint: 'yarn' args: ['install'] -# Install webgpu dependencies. +# Install packages. - name: 'node:10' dir: 'tfjs-backend-cpu' id: 'yarn' @@ -19,7 +19,23 @@ steps: id: 'build-deps' entrypoint: 'yarn' args: ['build-deps-ci'] - waitFor: ['yarn'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-backend-cpu' + id: 'build' + entrypoint: 'yarn' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-backend-cpu' + id: 'lint' + entrypoint: 'yarn' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] # Run tests. - name: 'node:10' @@ -27,7 +43,7 @@ steps: entrypoint: 'yarn' id: 'test-backend-cpu' args: ['test-ci'] - waitFor: ['build-deps'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] secretEnv: ['BROWSERSTACK_KEY'] diff --git a/tfjs-backend-cpu/package.json b/tfjs-backend-cpu/package.json index caf1131e8a3..e6ea4ece117 100644 --- a/tfjs-backend-cpu/package.json +++ b/tfjs-backend-cpu/package.json @@ -55,7 +55,7 @@ "publish-npm": "npm publish", "lint": "tslint -p . -t verbose", "test": "yarn && yarn build-deps && ts-node run_tests.ts", - "test-ci": "yarn lint && yarn build-ci && ts-node run_tests.ts" + "test-ci": "ts-node run_tests.ts" }, "dependencies": { "@types/seedrandom": "2.4.27", diff --git a/tfjs-backend-wasm/cloudbuild.yml b/tfjs-backend-wasm/cloudbuild.yml index db48e71f493..41830ee81c1 100644 --- a/tfjs-backend-wasm/cloudbuild.yml +++ b/tfjs-backend-wasm/cloudbuild.yml @@ -5,13 +5,45 @@ steps: entrypoint: 'yarn' args: ['install'] -# Run tests in browser. +# Install packages. +- name: 'node:10' + dir: 'tfjs-backend-wasm' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Install build-deps. +- name: 'node:10' + dir: 'tfjs-backend-wasm' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-backend-wasm' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-backend-wasm' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + +# Run JS tests. - name: 'node:10' dir: 'tfjs-backend-wasm' entrypoint: 'yarn' id: 'test-wasm' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'build', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1'] secretEnv: ['BROWSERSTACK_KEY'] @@ -21,7 +53,7 @@ steps: entrypoint: 'yarn' id: 'test-cc' args: ['test-cc'] - waitFor: ['test-wasm'] + waitFor: ['build'] # Check bundle size. - name: 'node:10' @@ -29,7 +61,7 @@ steps: id: 'test-bundle-size' entrypoint: 'yarn' args: ['test-bundle-size'] - waitFor: ['test-wasm'] + waitFor: ['build'] # Lint bazel files. - name: 'node:10' @@ -37,7 +69,7 @@ steps: id: 'buildifier' entrypoint: 'yarn' args: ['buildifier-ci'] - waitFor: ['test-wasm'] + waitFor: ['yarn'] # General configuration secrets: diff --git a/tfjs-backend-wasm/scripts/test-ci.sh b/tfjs-backend-wasm/scripts/test-ci.sh index 1ef2769e3cc..873c7aa2fee 100755 --- a/tfjs-backend-wasm/scripts/test-ci.sh +++ b/tfjs-backend-wasm/scripts/test-ci.sh @@ -10,9 +10,5 @@ set -e # Regular testing. -yarn -yarn build-deps-ci -yarn build-ci -yarn lint yarn test-node yarn test-browser-ci diff --git a/tfjs-backend-webgl/cloudbuild.yml b/tfjs-backend-webgl/cloudbuild.yml index 0c0d65b3aab..5aedde10557 100644 --- a/tfjs-backend-webgl/cloudbuild.yml +++ b/tfjs-backend-webgl/cloudbuild.yml @@ -5,7 +5,7 @@ steps: entrypoint: 'yarn' args: ['install'] -# Install webgl dependencies. +# Install packages. - name: 'node:10' dir: 'tfjs-backend-webgl' id: 'yarn' @@ -13,21 +13,37 @@ steps: args: ['install'] waitFor: ['yarn-common'] -# Build core from master. +# Build deps. - name: 'node:10' dir: 'tfjs-backend-webgl' - id: 'build-core' + id: 'build-deps' entrypoint: 'yarn' - args: ['build-core-ci'] + args: ['build-deps-ci'] waitFor: ['yarn-common'] +# Build. +- name: 'node:10' + dir: 'tfjs-backend-webgl' + id: 'build' + entrypoint: 'yarn' + args: ['build-ci'] + waitFor: ['yarn', build-deps] + +# Lint. +- name: 'node:10' + dir: 'tfjs-backend-webgl' + id: 'lint' + entrypoint: 'yarn' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Run tests. - name: 'node:10' dir: 'tfjs-backend-webgl' entrypoint: 'yarn' - id: 'test-backend-webgl' + id: 'test' args: ['test-ci'] - waitFor: ['build-core'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] secretEnv: ['BROWSERSTACK_KEY'] diff --git a/tfjs-backend-webgl/package.json b/tfjs-backend-webgl/package.json index 3976c270548..7ec60003365 100644 --- a/tfjs-backend-webgl/package.json +++ b/tfjs-backend-webgl/package.json @@ -47,14 +47,16 @@ "build": "tsc", "build-core": "cd ../tfjs-core && yarn && yarn build", "build-core-ci": "cd ../tfjs-core && yarn && yarn build-ci", + "build-deps": "yarn build-core", + "build-deps-ci": "yarn build-core-ci", "build-npm": "./scripts/build-npm.sh", "link-local": "yalc link", "publish-local": "rimraf dist/ && yarn build && rollup -c && yalc push", "publish-npm": "npm publish", "lint": "tslint -p . -t verbose", - "test": "yarn build-core && karma start", - "run-browserstack": "karma start --browserstack", - "test-ci": "./scripts/test-ci.sh" + "test": "yarn && yarn build-deps && karma start", + "test-ci": "./scripts/test-ci.sh", + "run-browserstack": "karma start --browserstack" }, "dependencies": { "@types/offscreencanvas": "~2019.3.0", diff --git a/tfjs-backend-webgl/scripts/test-ci.sh b/tfjs-backend-webgl/scripts/test-ci.sh index e789599e274..17bd9025334 100755 --- a/tfjs-backend-webgl/scripts/test-ci.sh +++ b/tfjs-backend-webgl/scripts/test-ci.sh @@ -16,9 +16,6 @@ set -e -yarn lint -yarn build-ci - if [ "$NIGHTLY" = true ] then # Run the first karma separately so it can download the BrowserStack binary diff --git a/tfjs-converter/cloudbuild.yml b/tfjs-converter/cloudbuild.yml index 6955ca5d64d..3331ef65ed2 100644 --- a/tfjs-converter/cloudbuild.yml +++ b/tfjs-converter/cloudbuild.yml @@ -6,14 +6,37 @@ steps: id: 'yarn-common' args: ['install'] -# Install tfjs-converter dependencies +# Install tfjs-converter dependencies. - name: 'node:10' dir: 'tfjs-converter' entrypoint: 'yarn' id: 'yarn' args: ['install'] waitFor: ['yarn-common'] - env: ['NIGHTLY=$_NIGHTLY'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs-converter' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-converter' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-converter' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] # Run javascript tests. - name: 'node:10' @@ -21,7 +44,7 @@ steps: entrypoint: 'yarn' id: 'test-js' args: ['test-ci'] - waitFor: ['yarn'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['NIGHTLY=$_NIGHTLY'] # Run python tests. @@ -48,7 +71,7 @@ steps: entrypoint: 'yarn' id: 'test-snippets' args: ['test-snippets'] - waitFor: ['test-js'] + waitFor: ['build'] timeout: 1800s logsBucket: 'gs://tfjs-build-logs' diff --git a/tfjs-converter/package.json b/tfjs-converter/package.json index a6b93fd2519..ce75afa57c1 100644 --- a/tfjs-converter/package.json +++ b/tfjs-converter/package.json @@ -68,7 +68,7 @@ "publish-local": "yarn build-npm && yalc push", "publish-npm": "npm publish", "test": "yarn && yarn build-deps && yarn gen-json --test && ts-node run_tests.ts", - "test-ci": "yarn && yarn build-deps-ci && yarn build-ci && yarn lint && ts-node run_tests.ts", + "test-ci": "ts-node run_tests.ts", "test-snippets": "ts-node ./scripts/test_snippets.ts", "lint": "tslint -p . -t verbose", "make-version": "sh -c ./scripts/make-version", diff --git a/tfjs-core/cloudbuild.yml b/tfjs-core/cloudbuild.yml index 6f052188f9f..cefa295ba8d 100644 --- a/tfjs-core/cloudbuild.yml +++ b/tfjs-core/cloudbuild.yml @@ -13,6 +13,7 @@ steps: args: ['install'] waitFor: ['yarn-common'] +# Build deps. - name: 'node:10' dir: 'tfjs-core' id: 'build-deps' @@ -20,13 +21,21 @@ steps: args: ['build-deps-ci'] waitFor: ['yarn'] -# Build +# Build. - name: 'node:10' dir: 'tfjs-core' id: 'build' entrypoint: 'yarn' args: ['build-ci'] - waitFor: ['build-deps'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-core' + id: 'lint' + entrypoint: 'yarn' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] # Run unit tests. - name: 'node:10' @@ -34,7 +43,7 @@ steps: id: 'test' entrypoint: 'yarn' args: ['test-ci'] - waitFor: ['build'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] secretEnv: ['BROWSERSTACK_KEY'] diff --git a/tfjs-core/package.json b/tfjs-core/package.json index 991adb2fae7..dec82e87dd8 100644 --- a/tfjs-core/package.json +++ b/tfjs-core/package.json @@ -69,6 +69,7 @@ "lint": "tslint -p . -t verbose", "coverage": "KARMA_COVERAGE=1 karma start --browsers='Chrome' --singleRun", "test": "yarn && yarn build-deps && karma start", + "test-ci": "./scripts/test-ci.sh", "test-webworker": "karma start --worker", "run-browserstack": "karma start --browserstack", "test-bundle-size": "./scripts/test-bundle-size.js", @@ -76,7 +77,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-ci": "./scripts/test-ci.sh", "test-snippets": "yarn build && yarn build-cpu-backend && ts-node ./scripts/test_snippets/test_snippets.ts" }, "dependencies": { diff --git a/tfjs-core/scripts/test-ci.sh b/tfjs-core/scripts/test-ci.sh index 8ce404185de..b5385fb4b08 100755 --- a/tfjs-core/scripts/test-ci.sh +++ b/tfjs-core/scripts/test-ci.sh @@ -16,7 +16,6 @@ set -e -yarn lint # Test in node (headless environment). yarn test-node-ci diff --git a/tfjs-data/cloudbuild.yml b/tfjs-data/cloudbuild.yml index 5fff0880d83..47c93ef4a4d 100644 --- a/tfjs-data/cloudbuild.yml +++ b/tfjs-data/cloudbuild.yml @@ -6,13 +6,45 @@ steps: id: 'yarn-common' args: ['install'] +# Install packages. +- name: 'node:10' + dir: 'tfjs-data' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs-data' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-data' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-data' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Run tests in node. - name: 'node:10' dir: 'tfjs-data' entrypoint: 'yarn' id: 'test' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'lint'] # Run data snippets tests. - name: 'node:10' @@ -20,7 +52,7 @@ steps: entrypoint: 'yarn' id: 'test-snippets' args: ['test-snippets'] - waitFor: ['test'] + waitFor: ['build'] timeout: 1800s logsBucket: 'gs://tfjs-build-logs' diff --git a/tfjs-data/package.json b/tfjs-data/package.json index 3a058dc4cbe..24c271d5a58 100644 --- a/tfjs-data/package.json +++ b/tfjs-data/package.json @@ -56,7 +56,7 @@ "publish-npm": "npm publish", "test": "yarn && yarn build-deps && ts-node src/test_node.ts", "test-browsers": "karma start --browsers='Chrome,Firefox'", - "test-ci": "yarn && yarn build-deps-ci && yarn build-ci && yarn lint && ts-node src/test_node.ts", + "test-ci": "ts-node src/test_node.ts", "test-snippets": "ts-node ./scripts/test_snippets.ts", "lint": "tslint -p . -t verbose" }, diff --git a/tfjs-layers/cloudbuild.yml b/tfjs-layers/cloudbuild.yml index 99a22fd8697..fd96cd65b44 100644 --- a/tfjs-layers/cloudbuild.yml +++ b/tfjs-layers/cloudbuild.yml @@ -5,13 +5,45 @@ steps: id: 'yarn-common' args: ['install'] +# Install packages. +- name: 'node:10' + dir: 'tfjs-layers' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs-layers' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-layers' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-layers' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Run javascript tests - name: 'node:10' dir: 'tfjs-layers' entrypoint: 'yarn' id: 'test-browser' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] secretEnv: ['BROWSERSTACK_KEY'] @@ -35,7 +67,7 @@ steps: entrypoint: 'yarn' id: 'test-snippets' args: ['test-snippets'] - waitFor: ['tfjs2keras-py'] + waitFor: ['build'] secrets: - kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc secretEnv: diff --git a/tfjs-layers/scripts/test-ci.sh b/tfjs-layers/scripts/test-ci.sh index b42d863dc9a..01c8564ff92 100755 --- a/tfjs-layers/scripts/test-ci.sh +++ b/tfjs-layers/scripts/test-ci.sh @@ -10,8 +10,4 @@ set -e # Regular testing. -yarn -yarn build-deps-ci -yarn build-ci -yarn lint yarn run-browserstack diff --git a/tfjs-node-gpu/cloudbuild.yml b/tfjs-node-gpu/cloudbuild.yml index 2e705d3fe8f..ec80111bcee 100644 --- a/tfjs-node-gpu/cloudbuild.yml +++ b/tfjs-node-gpu/cloudbuild.yml @@ -13,13 +13,53 @@ steps: args: ['install'] waitFor: ['prep-gpu'] +# Install packages. +- name: 'node:10' + dir: 'tfjs-node-gpu' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Build add-on. +- name: 'node:10' + dir: 'tfjs-node-gpu' + entrypoint: 'yarn' + id: 'build-addon' + args: ['build-addon-from-source'] + waitFor: ['yarn'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs-node-gpu' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-node-gpu' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-node-gpu' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Unit tests. - name: 'node:10' dir: 'tfjs-node-gpu' entrypoint: 'yarn' id: 'test' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'lint'] # Integration test. - name: 'node:10' @@ -35,7 +75,7 @@ steps: entrypoint: 'yarn' id: 'ensure-cpu-gpu-packages-align' args: ['ensure-cpu-gpu-packages-align'] - waitFor: ['test'] + waitFor: ['yarn-common'] timeout: 1800s logsBucket: 'gs://tfjs-build-logs' diff --git a/tfjs-node-gpu/package.json b/tfjs-node-gpu/package.json index c5ec8e4f2ec..25ce8411f8e 100644 --- a/tfjs-node-gpu/package.json +++ b/tfjs-node-gpu/package.json @@ -44,7 +44,7 @@ "publish-local": "yarn prep && yalc push", "publish-npm": "npm publish", "test": "yarn && yarn build-deps && yarn build && ts-node src/run_tests.ts", - "test-ci": "./scripts/test-ci.sh", + "test-ci": "ts-node src/run_tests.ts", "test-ts-integration": "./scripts/test-ts-integration.sh", "upload-windows-addon": "prep-gpu-windows.bat && ./scripts/build-and-upload-windows-addon-gpu.bat" }, diff --git a/tfjs-node/cloudbuild.yml b/tfjs-node/cloudbuild.yml index e4c872cd6b2..6c732334b99 100644 --- a/tfjs-node/cloudbuild.yml +++ b/tfjs-node/cloudbuild.yml @@ -5,13 +5,53 @@ steps: entrypoint: 'yarn' args: ['install'] +# Install packages. +- name: 'node:10' + dir: 'tfjs-node' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Build add-on. +- name: 'node:10' + dir: 'tfjs-node' + entrypoint: 'yarn' + id: 'build-addon' + args: ['build-addon-from-source'] + waitFor: ['yarn'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs-node' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs-node' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs-node' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Unit tests. - name: 'node:10' dir: 'tfjs-node' entrypoint: 'yarn' id: 'test' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'lint'] # Integration test. - name: 'node:10' @@ -19,7 +59,7 @@ steps: entrypoint: 'yarn' id: 'test-ts-integration' args: ['test-ts-integration'] - waitFor: ['test'] + waitFor: ['yarn', 'build-deps', 'lint'] # CPU / GPU package alignment. - name: 'node:10' @@ -27,7 +67,7 @@ steps: entrypoint: 'yarn' id: 'ensure-cpu-gpu-packages-align' args: ['ensure-cpu-gpu-packages-align'] - waitFor: ['test'] + waitFor: ['yarn-common'] timeout: 1800s logsBucket: 'gs://tfjs-build-logs' diff --git a/tfjs-node/package.json b/tfjs-node/package.json index 16dd6f64de8..90ae1825dd9 100644 --- a/tfjs-node/package.json +++ b/tfjs-node/package.json @@ -42,7 +42,7 @@ "publish-local": "yarn prep && yalc push", "publish-npm": "npm publish", "test": "yarn && yarn build-deps && yarn build && ts-node src/run_tests.ts", - "test-ci": "./scripts/test-ci.sh", + "test-ci": "ts-node src/run_tests.ts", "test-ts-integration": "./scripts/test-ts-integration.sh", "upload-windows-addon": "./scripts/build-and-upload-windows-addon.bat" }, diff --git a/tfjs-node/scripts/test-ci.sh b/tfjs-node/scripts/test-ci.sh deleted file mode 100755 index 94daf20b66a..00000000000 --- a/tfjs-node/scripts/test-ci.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 Google LLC -# -# Use of this source code is governed by an MIT-style -# license that can be found in the LICENSE file or at -# https://opensource.org/licenses/MIT. -# ============================================================================= - -set -e - -yarn -yarn build-addon-from-source -yarn build-deps-ci -yarn build-ci -yarn lint -yarn test diff --git a/tfjs/cloudbuild.yml b/tfjs/cloudbuild.yml index 3582a7804a9..3388b5512d1 100644 --- a/tfjs/cloudbuild.yml +++ b/tfjs/cloudbuild.yml @@ -6,13 +6,45 @@ steps: entrypoint: 'yarn' args: ['install'] +# Install packages. +- name: 'node:10' + dir: 'tfjs' + entrypoint: 'yarn' + id: 'yarn' + args: ['install'] + waitFor: ['yarn-common'] + +# Build deps. +- name: 'node:10' + dir: 'tfjs' + entrypoint: 'yarn' + id: 'build-deps' + args: ['build-deps-ci'] + waitFor: ['yarn-common'] + +# Build. +- name: 'node:10' + dir: 'tfjs' + entrypoint: 'yarn' + id: 'build' + args: ['build-ci'] + waitFor: ['yarn', 'build-deps'] + +# Lint. +- name: 'node:10' + dir: 'tfjs' + entrypoint: 'yarn' + id: 'lint' + args: ['lint'] + waitFor: ['yarn', 'build-deps'] + # Run tfjs tests. - name: 'node:10' dir: 'tfjs' entrypoint: 'yarn' id: 'test' args: ['test-ci'] - waitFor: ['yarn-common'] + waitFor: ['yarn', 'build-deps', 'lint'] env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY'] secretEnv: ['BROWSERSTACK_KEY', 'FIREBASE_KEY'] diff --git a/tfjs/scripts/test-ci.sh b/tfjs/scripts/test-ci.sh index 2caee0e7466..9b7304525f9 100755 --- a/tfjs/scripts/test-ci.sh +++ b/tfjs/scripts/test-ci.sh @@ -17,10 +17,6 @@ # Exit immediately if a command exits with a non-zero status. set -e -yarn -yarn build-deps -yarn build-ci -yarn lint yarn karma start --browsers='bs_firefox_mac,bs_chrome_mac' --singleRun cd integration_tests yarn benchmark-cloud