Skip to content

Commit 51c0362

Browse files
committed
Merge pull request #61 from js-data/develop
Stable Version 0.11.10
2 parents cdca424 + a5c360a commit 51c0362

File tree

12 files changed

+10423
-557
lines changed

12 files changed

+10423
-557
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,40 @@ the first place
7878
- `DB_HOST`: `localhost`
7979
- `DB_NAME`: `circle_test`
8080
- `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+
81115
1. Your code will be linted and checked for formatting, the tests will be run
82116
1. The `dist/` folder & files will be generated, do NOT commit `dist/*`! They
83117
will be committed when a release is cut.

circle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ machine:
44

55
database:
66
override:
7-
- mysql -u ubuntu circle_test < test/setup.sql
7+
- DB_CLIENT=mysql npm run migrate-db
8+
- DB_CLIENT=pg npm run migrate-db
89
test:
910
override:
1011
- npm run ci

0 commit comments

Comments
 (0)