Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move back to container-based Travis builds and removed some redundant tests. #58

Merged
merged 1 commit into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
"deps_storage": "cd storage; npm i; cd ../..",
"deps_prediction": "cd prediction; npm i; cd ../..",
"deps_logging": "cd logging; npm i; cd ../..",
"deps_express": "cd appengine/express; npm i; cd ../..",
"deps_sendgrid": "cd appengine/sendgrid; npm i; cd ../..; cd computeengine/sendgrid; npm i; cd ../..",
"deps_memcached": "cd appengine/express-memcached-session && npm i && cd ../..",
"deps_sendgrid": "cd computeengine/sendgrid; npm i; cd ../..",
"pretest_geddy": "cd appengine/geddy; npm i geddy; GEDDY_SECRET=config/secrets.json; [[ -f $GEDDY_SECRET ]] || echo '{}' > $GEDDY_SECRET && node node_modules/.bin/geddy gen secret; cd ../..;",
"pretest": "npm run deps_datastore; npm run deps_storage; npm run deps_pubsub; npm run deps_prediction; npm run deps_logging; npm run deps_memcached; npm run deps_express; npm run deps_sendgrid; npm run pretest_geddy",
"pretest": "npm run deps_datastore; npm run deps_storage; npm run deps_pubsub; npm run deps_prediction; npm run deps_logging; npm run deps_sendgrid; npm run pretest_geddy",
"test": "npm run jshint && npm run cover"
},
"devDependencies": {
Expand Down
26 changes: 0 additions & 26 deletions test/appengine/express-memcached-session.test.js

This file was deleted.

49 changes: 0 additions & 49 deletions test/appengine/express.test.js

This file was deleted.

36 changes: 0 additions & 36 deletions test/appengine/sendgrid.test.js

This file was deleted.

26 changes: 17 additions & 9 deletions test/logging/write.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,25 @@ 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) {
if (err.code === 404) {
return done();
}
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