Skip to content

Commit

Permalink
ci(travis): make travis run tests on mysql also
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 1, 2018
1 parent 44164c7 commit 1aff675
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 172 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ node_js:
- node
- 8.0.0
sudo: false
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE testing_lucid;'
install:
- npm install
after_script:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test:cleanup": "rm -rf test/functional/database && rm -rf test/unit/tmp",
"test": "DB=sqlite nyc node japaFile.js",
"test:sqlite": "DB=sqlite node japaFile.js",
"test:mysql": "DB=mysql node japaFile.js",
"test": "nyc npm run test:sqlite && npm run test:mysql",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"commit": "git-cz",
"lint": "standard"
Expand Down
54 changes: 0 additions & 54 deletions test/unit/helpers/config.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/unit/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ module.exports = {
version: '5.7',
connection: {
host: '127.0.0.1',
user: 'virk',
password: 'virk',
user: 'travis',
password: '',
database: 'testing_lucid'
}
})
Expand Down
40 changes: 0 additions & 40 deletions test/unit/helpers/mysqlConnections.js

This file was deleted.

37 changes: 0 additions & 37 deletions test/unit/helpers/postgresConnection.js

This file was deleted.

37 changes: 0 additions & 37 deletions test/unit/helpers/sqliteConnections.js

This file was deleted.

2 changes: 1 addition & 1 deletion test/unit/lucid-has-many.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ test.group('Relations | Has Many', (group) => {

const users = await User.query().with('cars', (builder) => {
builder
.select('cars.*', ioc.use('Database').raw('count("older_cars"."id") as older_cars_count'))
.select('cars.*', ioc.use('Database').raw(helpers.formatQuery('count("older_cars"."id") as older_cars_count')))
.joinRaw('left join cars older_cars on older_cars.model < cars.model')
.groupBy('cars.id')
}).fetch()
Expand Down

0 comments on commit 1aff675

Please sign in to comment.