@@ -78,6 +78,40 @@ the first place
78
78
- ` DB_HOST ` : ` localhost `
79
79
- ` DB_NAME ` : ` circle_test `
80
80
- ` DB_USER ` : ` ubuntu `
81
+ - You may use ` docker ` /` docker-compose ` to create MySql and Postgres containers to test against
82
+ - ` docker-compose up -d `
83
+ - Start containers named ` js-data-sql-mysql ` and ` js-data-sql-pg `
84
+ - MySQL
85
+ - Environment variables
86
+ - ` DB_CLIENT ` = ` mysql `
87
+ - ` DB_USER ` = ` root `
88
+ - ` DB_HOST ` = ` IP of docker-machine if not localhost `
89
+ - Populate schema
90
+ - ` DB_CLIENT=mysql DB_USER=root npm run migrate-db `
91
+ - Also set ` DB_HOST ` if different from ` localhost `
92
+ - Run tests
93
+ - ` npm run mocha-mysql `
94
+ - Set ` DB_HOST ` if different from ` localhost `
95
+ - Run cli
96
+ - ` docker exec -it js-data-sql-mysql mysql circle_test `
97
+ - Postgres
98
+ - Environment variables
99
+ - ` DB_CLIENT ` = ` pg `
100
+ - ` DB_USER ` = ` ubuntu `
101
+ - ` DB_HOST ` = ` IP of docker-machine if not localhost `
102
+ - Populate schema
103
+ - ` DB_CLIENT=pg npm run migrate-db `
104
+ - Also set ` DB_HOST ` if different from ` localhost `
105
+ - Run tests
106
+ - ` npm run mocha-pg `
107
+ - Also set ` DB_HOST ` if different from ` localhost `
108
+ - ` docker exec -it js-data-sql-pg psql -U ubuntu -d circle_test `
109
+ - Run cli
110
+ - All databases
111
+ - Run all tests against MySQL and Postgres
112
+ - ` npm run mocha-all `
113
+ - Also set ` DB_HOST ` if different from ` localhost `
114
+
81
115
1 . Your code will be linted and checked for formatting, the tests will be run
82
116
1 . The ` dist/ ` folder & files will be generated, do NOT commit ` dist/* ` ! They
83
117
will be committed when a release is cut.
0 commit comments