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

Commit

Permalink
Test node againts tfjs-core@master on Travis Nightly (every 24h) (#170)
Browse files Browse the repository at this point in the history
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

(Analogous change in layers: tensorflow/tfjs-layers#353)

DEV
  • Loading branch information
dsmilkov committed Oct 29, 2018
1 parent 1343bb1 commit 99b0e04
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .travis.yml
Expand Up @@ -3,9 +3,15 @@ os:
- osx
language: node_js
node_js: "8"

script:
- yarn
- yarn build
- yarn lint
- yarn test
- ./scripts/test-travis.sh
cache: yarn
git:
depth: 5
notifications:
email:
recipients:
- tensorflowjs-build@google.com
on_success: never
on_failure: always
on_pull_requests: false
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

0 comments on commit 99b0e04

Please sign in to comment.