Skip to content

Commit

Permalink
Move back to container-based Travis builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Jan 27, 2016
1 parent 1ef3a38 commit 8c6b16b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 19 deletions.
35 changes: 25 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,53 @@
# See the License for the specific language governing permissions and
# limitations under the License.

sudo: required
sudo: false
language: node_js
node_js:
- "stable"
- "0.12"
- "0.10"

cache:
directories:
- $HOME/gcloud/
directories:
- appengine/analytics/node_modules/
- appengine/bower/node_modules/
- appengine/cloudsql/node_modules/
- appengine/datastore/node_modules/
- appengine/disk/node_modules/
- appengine/express/node_modules/
- appengine/express-memcached-session/node_modules/
- appengine/extending-runtime/node_modules/
- appengine/geddy/node_modules/
- appengine/grunt/node_modules/
- appengine/hapi/node_modules/
- appengine/hello-world/node_modules/
- appengine/koa/node_modules/
- appengine/kraken/node_modules/
- appengine/logging/node_modules/
- appengine/loopback/node_modules/
- appengine/mailgun/node_modules/
- appengine/memcached/node_modules/
- appengine/mongodb/node_modules/
- appengine/redis/node_modules/
- appengine/restify/node_modules/
- appengine/sails/node_modules/
- appengine/sendgrid/node_modules/
- appengine/static-files/node_modules/
- appengine/storage/node_modules/
- appengine/twilio/node_modules/
- appengine/webpack/node_modules/
- appengine/websockets/node_modules/
- computeengine/sendgrid/node_modules/
- datastore/node_modules/
- logging/node_modules/
- prediction/node_modules/
- pubsub/node_modules/
- storage/node_modules/

services:
- redis-server
- memcached
- docker

env:
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/test/encrypted/nodejs-docs-samples.json TEST_BUCKET_NAME=nodejs-docs-samples GCLOUD_PROJECT=nodejs-docs-samples #Other environment variables on same line
Expand All @@ -50,18 +69,14 @@ before_install:
cd $HOME/gcloud &&
tar xzf google-cloud-sdk.tar.gz &&
printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
source /home/travis/.bash_profile &&
source $HOME/.bashrc &&
cd $TRAVIS_BUILD_DIR;
fi
- gcloud components update -q
- gcloud components update app -q
- openssl aes-256-cbc -K $encrypted_fda0b707c7d5_key -iv $encrypted_fda0b707c7d5_iv -in test/encrypted/nodejs-docs-samples.json.enc -out test/encrypted/nodejs-docs-samples.json -d
- if [ -a test/encrypted/nodejs-docs-samples.json ]; then
gcloud auth activate-service-account --key-file test/encrypted/nodejs-docs-samples.json;
fi
- npm set progress=false

after_success:
- npm run coveralls

after_script:
- gsutil -m cp *.log gs://nodejs-docs-samples-travis-deployments
23 changes: 14 additions & 9 deletions test/logging/write.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,22 @@ describe('logging/write', function () {
if (err) {
return done(err);
}
assert.deepEqual(apiResponse, {}, 'should have correct response');
done();
});
});
it('should delete entries', function (done) {
logging.deleteLog(function (err, apiResponse) {
if (err) {
try {
assert.deepEqual(apiResponse, {}, 'should have correct response');
logging.deleteLog(function (err, apiResponse) {
if (err) {
return done(err);
}
try {
assert.deepEqual(apiResponse, {}, 'should have correct response');
return done();
} catch (err) {
return done(err);
}
});
} catch (err) {
return done(err);
}
assert.deepEqual(apiResponse, {}, 'should have correct response');
done();
});
});
});
1 change: 1 addition & 0 deletions test/prediction/hostedmodels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var EXPECTED_RESULT = {

describe('prediction/hostedmodels', function () {
it('should predict', function (done) {
this.timeout(30000);
hostedmodels.predict(function (err, result) {
if (err) {
return done(err);
Expand Down

0 comments on commit 8c6b16b

Please sign in to comment.