Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Commit

Permalink
Test layers againts tfjs-core@master on Travis Nightly (every 24 hour…
Browse files Browse the repository at this point in the history
…s) (#353)

Travis nightly will clone and link the latest unpublished tfjs-core before running any of the regular stuff (build, lint, test).

If a nightly fails, Travis will email us (assuming you have correct email settings). Nightly runs every 24 hours.

Towards tensorflow/tfjs#848

DEV
  • Loading branch information
dsmilkov committed Oct 26, 2018
1 parent b5e2570 commit 81c21b1
Show file tree
Hide file tree
Showing 4 changed files with 583 additions and 36 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -6,9 +6,7 @@ matrix:
- "8"
- "10"
script:
- yarn build
- yarn lint
- yarn test-travis
- ./scripts/test-travis.sh
cache: yarn
git:
depth: 5
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -15,7 +15,7 @@
"clang-format": "~1.2.2",
"http-server": "~0.10.0",
"jasmine-core": "~3.1.0",
"karma": "~2.0.0",
"karma": "~2.0.2",
"karma-browserstack-launcher": "~1.3.0",
"karma-chrome-launcher": "~2.2.0",
"karma-firefox-launcher": "~1.1.0",
Expand Down
28 changes: 28 additions & 0 deletions scripts/test-travis.sh
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# Copyright 2018 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

# If this is nightly, use tfjs-core at master.
if [ "$TRAVIS_EVENT_TYPE" = cron ]
then
echo '########### Testing against tfjs-core@master ###########'
yarn run rimraf tfjs-core/
# depth is an optimization for faster clone (don't clone all of history).
git clone https://github.com/tensorflow/tfjs-core.git --depth=5
cd tfjs-core
yarn && yarn build && yarn publish-local
cd ..
yarn link-local '@tensorflow/tfjs-core'
fi

# Regular testing.
yarn build
yarn lint
yarn test-travis

0 comments on commit 81c21b1

Please sign in to comment.