Skip to content

Commit

Permalink
Add deployment tests. Closes #21.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Nov 6, 2015
1 parent 5469269 commit ccb6da6
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 70 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**/node_modules/**
npm-debug.log
coverage/
coverage/

test/encrypted/secrets.tar
test/encrypted/express-demo.json
test/encrypted/hapi-demo.json
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sudo: false
sudo: required
language: node_js
node_js:
- "stable"
Expand All @@ -20,6 +20,7 @@ cache:

services:
- redis-server
- docker

env:
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/nodejs-docs-samples.json TEST_BUCKET_NAME=cloud-samples-tests TEST_PROJECT_ID=cloud-samples-tests #Other environment variables on same line
Expand All @@ -44,6 +45,18 @@ before_install:
printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
cd $TRAVIS_BUILD_DIR;
fi
- gcloud components update -q
- gcloud components update preview -q
- openssl aes-256-cbc -K $encrypted_4e84c7c7ab67_key -iv $encrypted_4e84c7c7ab67_iv -in test/encrypted/secrets.tar.enc -out test/encrypted/secrets.tar -d
- if [ -a test/encrypted/secrets.tar ]; then
cd test/encrypted && tar xvf secrets.tar && cd ../..;
fi
- if [ -a test/encrypted/express-demo.json ]; then
gcloud auth activate-service-account --key-file test/encrypted/express-demo.json;
fi
- if [ -a test/encrypted/hapi-demo.json ]; then
gcloud auth activate-service-account --key-file test/encrypted/hapi-demo.json;
fi
- openssl aes-256-cbc -K $encrypted_95e832a36b06_key -iv $encrypted_95e832a36b06_iv -in nodejs-docs-samples.json.enc -out nodejs-docs-samples.json -d
- if [ -a nodejs-docs-samples.json ]; then
gcloud auth activate-service-account --key-file nodejs-docs-samples.json;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"googleapis": "~2.1.3"
},
"devDependencies": {
"async": "^1.5.0",
"coveralls": "^2.11.4",
"istanbul": "^0.4.0",
"jshint": "~2.8.0",
Expand Down
Loading

0 comments on commit ccb6da6

Please sign in to comment.