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
Docker based test dbs #3157
Docker based test dbs #3157
Changes from 12 commits
bc06f25
37f6b60
4181790
ebdcd09
1080d68
eb0a025
255d273
3c0f97c
d2fc5c2
6a7862c
1f7a141
ae2149b
043ae20
1bf149d
754af01
fa57e47
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 |
---|---|---|
|
@@ -20,11 +20,13 @@ | |
"liftoff": "3.1.0", | ||
"lodash": "^4.17.11", | ||
"mkdirp": "^0.5.1", | ||
"oracledb": "^3.1.2", | ||
"pg-connection-string": "2.0.0", | ||
"tarn": "^1.1.5", | ||
"tildify": "1.2.0", | ||
"uuid": "^3.3.2", | ||
"v8flags": "^3.1.3" | ||
"v8flags": "^3.1.3", | ||
"webpack": "^4.30.0" | ||
elhigu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"lint-staged": { | ||
"*.{js,json}": [ | ||
|
@@ -71,7 +73,8 @@ | |
"tape": "^4.10.1", | ||
"typescript": "^3.4.5", | ||
"through": "^2.3.8", | ||
"toxiproxy-node-client": "^2.0.6" | ||
"toxiproxy-node-client": "^2.0.6", | ||
"webpack-cli": "^3.3.1" | ||
}, | ||
"buildDependencies": [ | ||
"@babel/cli", | ||
|
@@ -80,21 +83,22 @@ | |
"rimraf" | ||
], | ||
"scripts": { | ||
"babel": "rimraf ./lib && babel src --out-dir lib --copy-files", | ||
"format": "prettier --write \"{src,bin,scripts,test}/**/*.js\"", | ||
"build": "npm run babel", | ||
"debug:test": "node --inspect-brk ./node_modules/.bin/_mocha -- --exit -t 0 test/index.js", | ||
"debug_test": "mocha --inspect-brk --exit -t 0 test/index.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate, there's already "debug:test" |
||
"babel": "rimraf ./lib && babel src --out-dir lib --copy-files", | ||
"debug:test": "mocha --inspect-brk --exit -t 0 test/index.js", | ||
"debug:tape": "node --inspect-brk test/tape/index.js", | ||
"format": "prettier --write \"{src,bin,scripts,test}/**/*.js\"", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"dev": "rimraf ./lib && babel -w src --out-dir lib --copy-files", | ||
"lint": "eslint '{src,test}/**/*.js'", | ||
"lint:types": "dtslint types", | ||
"plaintest": "mocha --exit -t 10000 -b -R spec test/index.js && npm run tape", | ||
"plaintest": "mocha --exit -t 10000 test/index.js && npm run tape && npm run test:cli", | ||
"plaintest:sqlite": "cross-env DB=sqlite3 npm run plaintest", | ||
"prepare": "npm run babel", | ||
"prepublishOnly": "npm run babel", | ||
"pretest": "npm run lint && npm run lint:types && npm run babel", | ||
"test": "nyc mocha --exit --check-leaks --globals __core-js_shared__ -t 10000 -R spec test/index.js && npm run test:tape && npm run test:cli", | ||
"test": "nyc mocha --exit --check-leaks --globals __core-js_shared__ -t 10000 test/index.js && npm run tape && npm run bin_test", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be "npm run test:tape && npm run test:cli"" |
||
"test:tape": "node test/tape/index.js | tap-spec", | ||
"test:cli": "cross-env KNEX_PATH=../knex.js KNEX=bin/cli.js jake -f test/jake/Jakefile", | ||
"oracledb:test": "docker rmi -f --no-prune knex-test-oracledb && docker build -f scripts/oracle-tests-Dockerfile --tag knex-test-oracledb . && docker run --rm -i -t -e KNEX_TEST_TIMEOUT=$KNEX_TEST_TIMEOUT -e NODE_VER=$NODE_VER knex-test-oracledb", | ||
|
@@ -103,6 +107,13 @@ | |
"mssql:test": "DB=mssql npm run plaintest", | ||
"mssql:destroy": "docker-compose -f scripts/mssql-docker-compose.yml stop", | ||
"postmssql:init": "node scripts/wait-for-mssql-server.js && npm run mssql:logs || (npm run mssql:logs;false)", | ||
"prepublish": "npm run babel", | ||
"pre_test": "npm run lint && npm run lint_types", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate, there's pretest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is pretest run automatically before publish? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aa you meant pre_test 👍 |
||
"bin_test": "cross-env KNEX_PATH=../knex.js KNEX=bin/cli.js jake -f test/jake/Jakefile", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate with test:cli |
||
"tape": "node test/tape/index.js | tap-spec", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate with test:tape There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about that "prepublishOnly", when that is ran? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. npm is throwing deprecation warning about prepublish now. Now there are two separate hooks: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, I'll remove prepublish already then. Its really unlikely that we would publish anything without running babel first, since its pretty much included in every hook there :) |
||
"debug_tape": "node --inspect-brk test/tape/index.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate, there's already "debug:tape" |
||
"db:start": "docker-compose -f scripts/docker-compose.yml up -d mysql oracledbxe postgres mssql; docker-compose -f scripts/docker-compose.yml up initmssqlknexdb waitmysql waitpostgres waitoracledbxe", | ||
"db:stop": "docker-compose -f scripts/docker-compose.yml down", | ||
"stress:init": "docker-compose -f scripts/stress-test/docker-compose.yml up --no-start && docker-compose -f scripts/stress-test/docker-compose.yml start", | ||
"stress:test": "node scripts/stress-test/knex-stress-test.js | grep -A 5 -B 60 -- '- STATS '", | ||
"stress:destroy": "docker-compose -f scripts/stress-test/docker-compose.yml stop" | ||
|
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.
should it be prodDependency?
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.
nope, we don't have any of the drivers as knex deps to be able to install only one that is used in the project.
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.
should be moved 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.
oracledb is still in prod dependencies :D