Skip to content

Commit

Permalink
Velocity ci patches (reactioncommerce#1046)
Browse files Browse the repository at this point in the history
* add bin/ci.sh

wraps velocity test and watch for tests passed output.  ci will timeout
if this doesn’t exit in 10 minutes.

* add npm.depends for bunyan testing

kludge fix, add npm.depends specifically for testing

* clean up extra param

remove extra VELOCITY_TEST_PACKAGES=1

* add export

the cleanup that became dirty.. add export
  • Loading branch information
Aaron Judd committed May 26, 2016
1 parent c94735d commit 5cade1f
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 4 deletions.
15 changes: 15 additions & 0 deletions bin/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -u
set -e
# test using velocity
export VELOCITY_TEST_PACKAGES=1
# send testing output to log
meteor test-packages --driver-package velocity:html-reporter --velocity >& logfile.log &
# tail log for passed tests notice
# circle ci test will timeout if we don't pass
tail -f logfile.log | while read LOGLINE
do
echo ${LOGLINE}
[[ "${LOGLINE}" == *"tests passed"* ]] && pkill -P $$ tail
done
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
test:
override:
- cd $HOME/reaction
- VELOCITY_TEST_PACKAGES=1 meteor test-packages --driver-package velocity:html-reporter --velocity
- bin/ci.sh
- docker-compose -f docker/docker-compose.test.yml up -d; sleep 10
- curl --retry 10 --retry-delay 5 -v http://localhost

Expand Down
1 change: 1 addition & 0 deletions packages/reaction-logger/.npm/package/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions packages/reaction-logger/.npm/package/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.

You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.
158 changes: 158 additions & 0 deletions packages/reaction-logger/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/reaction-logger/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Package.describe({
version: "0.2.1"
});

Npm.depends({
"bunyan": "1.8.1",
"bunyan-format": "0.2.1"
});

Package.onUse(function (api) {
api.versionsFrom("[email protected]");
api.use("tmeasday:[email protected]");
Expand Down
9 changes: 6 additions & 3 deletions packages/reaction-logger/tests/bunyan-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Tinytest.add('bunyan', function(test) {
test.isNotNull(logger, 'logger should be available');
test.isNotNull(bunyan, 'bunyan should be available');
bunyan = Npm.require("bunyan");
bunyanFormat = Npm.require("bunyan-format");

Tinytest.add("bunyan", function (test) {
test.isNotNull(logger, "logger should be available");
test.isNotNull(bunyan, "bunyan should be available");
});
1 change: 1 addition & 0 deletions packages/reaction-ui/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5cade1f

Please sign in to comment.