-
Notifications
You must be signed in to change notification settings - Fork 14
feat: abstract DB Adapter #112
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
757b931
76cc264
fd2a23f
c4ebf71
4b7a5c6
a334384
98cf306
17ba3bf
e04d2c7
e113733
0b51598
55c47af
b18ac68
821deb6
8a5de75
3829f5e
60746e9
6ba80a6
0dfc8c9
e4c8b44
ac18064
71aa982
2ee6993
275a7bb
7d5a1f2
8b7263d
0860363
12c5df1
7d7bfb4
785ccfd
8ea411f
d6cff19
7cc68c8
1cabd9c
71c46a5
db222e4
aaad1a4
98b5770
20fa21d
24e3674
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| const SEPARATOR = '!'; | ||
|
|
||
| /** | ||
| * Creates string key from passed arguments | ||
| * @return {String} | ||
| */ | ||
| module.exports = function combineKey(...args) { | ||
| return args.join(SEPARATOR); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,42 +10,44 @@ MOCHA=$BIN/_mocha | |
| COVER="$BIN/isparta cover" | ||
| NODE=$BIN/babel-node | ||
| TESTS=${TESTS:-test/suites/*.js} | ||
|
|
||
| if [ -z "$NODE_VER" ]; then | ||
| NODE_VER="6.2.0" | ||
| fi | ||
| NODE_VER=${NODE_VER:-6.2.1} | ||
| COMPOSE_VER=${COMPOSE_VER:-1.7.1} | ||
|
|
||
| if ! [ -x "$COMPOSE" ]; then | ||
| mkdir $DIR/.bin | ||
| curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > $DIR/.bin/docker-compose | ||
| curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VER}/docker-compose-`uname -s`-`uname -m` > $DIR/.bin/docker-compose | ||
| chmod +x $DIR/.bin/docker-compose | ||
| COMPOSE=$(which docker-compose) | ||
| # COMPOSE=$(which docker-compose) | ||
| COMPOSE="c:/dev/docker/docker-compose.exe" | ||
| fi | ||
|
|
||
| function finish { | ||
| "$COMPOSE" -f $DC stop | ||
| "$COMPOSE" -f $DC rm -f | ||
| $COMPOSE -f $DC stop | ||
| $COMPOSE -f $DC rm -f | ||
| } | ||
| trap finish EXIT | ||
|
|
||
| export IMAGE=makeomatic/alpine-node:$NODE_VER | ||
| "$COMPOSE" -f $DC up -d | ||
| export IMAGE=makeomatic/node:$NODE_VER | ||
| $COMPOSE -f $DC up -d | ||
|
|
||
| # add glibc | ||
| $COMPOSE -f $DC exec tester /bin/sh -c "apk --no-cache add build-base python" || exit 1 | ||
|
|
||
| if [[ "$SKIP_REBUILD" != "1" ]]; then | ||
| echo "rebuilding native dependencies..." | ||
| "$COMPOSE" -f $DC run --rm tester npm rebuild | ||
| $COMPOSE -f $DC exec tester npm rebuild | ||
|
||
| fi | ||
|
|
||
| echo "cleaning old coverage" | ||
| rm -rf ./coverage | ||
|
|
||
| echo "running tests" | ||
| for fn in $TESTS; do | ||
| "$COMPOSE" -f $DC run --rm tester /bin/sh -c "$NODE $COVER --dir ./coverage/${fn##*/} $MOCHA -- $fn" || exit 1 | ||
| $COMPOSE -f $DC exec tester /bin/sh -c "$NODE $COVER --dir ./coverage/${fn##*/} $MOCHA -- $fn" || exit 1 | ||
| done | ||
|
|
||
| echo "started generating combined coverage" | ||
| "$COMPOSE" -f $DC run --rm tester node ./test/aggregate-report.js | ||
| $COMPOSE -f $DC exec tester node ./test/aggregate-report.js | ||
|
|
||
| echo "uploading coverage report from ./coverage/lcov.info" | ||
| if [[ "$CI" == "true" ]]; then | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну да, так тесты и пройдут)