Skip to content

Commit

Permalink
chore: added basic integ tests as part of pre-push hook
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed May 24, 2018
1 parent 270015d commit 5390993
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
12 changes: 0 additions & 12 deletions bin/integ

This file was deleted.

4 changes: 4 additions & 0 deletions examples/hello-world/.garden/local-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kubernetes:
username: hello
previous-usernames:
- hello
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"dev": "gulp build && cd build && npm link && cd .. && gulp watch",
"dist": "gulp dist",
"fix-format": "node_modules/.bin/tslint -p . --fix && node_modules/.bin/tsfmt -r",
"integ": "./test/integ/run",
"lint": "gulp lint",
"prepare": "npm run snyk-protect",
"preversion": "npm test",
Expand All @@ -129,7 +130,7 @@
"husky": {
"hooks": {
"commit-msg": "validate-commit-msg -p angular",
"pre-push": "npm test"
"pre-push": "npm test && npm run integ"
}
},
"snyk": true
Expand Down
18 changes: 18 additions & 0 deletions test/integ/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash -eo pipefail

here=$(cd `dirname $0` && pwd)
garden_root=$(cd ${here} && cd $(git rev-parse --show-toplevel) && pwd)
garden_bin=${garden_root}/build/src/bin/garden.js

chmod +x ${garden_bin}

cd ${garden_root}/examples/hello-world

export GARDEN_LOGGER_TYPE=basic

cd ${here}/basic-project
${garden_bin} scan
${garden_bin} build
${garden_bin} deploy
${garden_bin} test
${garden_bin} env config

0 comments on commit 5390993

Please sign in to comment.