Skip to content
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

Picking up @jbrumwell #1456 to ease running tests #1674

Merged
merged 1 commit into from Nov 17, 2017

Conversation

Projects
None yet
4 participants
@rapzo
Copy link
Contributor

rapzo commented Oct 31, 2017

Containers to ease running the test bench

Introduction

Docker is supported in almost all platforms and has become really easy to setup and use. With a single command the boilerplate is reduced to none and tests run smoothly.

Motivation

This is an almost one year old PR, picked up from the scrap that shouldn't be forgotten nor ignored.
Tested it on *NIX systems and runs smoothly.

Proposed solution

Using containers to run the tests isolated and reduce the tested engines' setup boilerplate.

Current PR Issues

Was not tested on a Windows machine.

Picking up @jbrumwell #1456 to ease running tests
- merged his commit into the fold and dealt with the conflicts
- bumped docker-compose version to the latest and recommend one
- tagged postgres and mysql version
- fixed meaninless typos in github templates' files
@ricardograca

This comment has been minimized.

Copy link
Member

ricardograca commented Oct 31, 2017

I never used Docker. Will the SQLite and OracleDB tests run as well using Docker? Not sure how important the OracleDB tests are though.

@rapzo

This comment has been minimized.

Copy link
Contributor Author

rapzo commented Oct 31, 2017

SQLite tests run in memory so i don't think the overhead of opening a random port and piping data into the container worth the hassle.
I'll give a try patching with this image in https://hub.docker.com/r/azeemdin/oracledb/ although it doesn't look official and might lack support down the line.

But shouldn't it be engine independent? I mean, that's knex territory, right?

@ricardograca

This comment has been minimized.

Copy link
Member

ricardograca commented Oct 31, 2017

@rapzo That's another discussion that also took place in #1661. I don't see a problem with not having OracleDB tests with the Docker solution, since all specific database engine tests should eventually be removed anyway.

BTW, is it possible to configure Travis to use the new solution you propose here?

@rapzo

This comment has been minimized.

Copy link
Contributor Author

rapzo commented Oct 31, 2017

Travis uses docker for running its tests https://travis-ci.org/bookshelf/bookshelf/jobs/295316556#L33

But i'll look into, trying to get builds from my fork with a similar config. Will get back here when i get some results.

@ricardograca

This comment has been minimized.

Copy link
Member

ricardograca commented Oct 31, 2017

@rapzo Feel free to ignore my ignorant comments about Docker 😉

@rapzo

This comment has been minimized.

Copy link
Contributor Author

rapzo commented Nov 2, 2017

Been trying some mixed configs into this but it looks like travis is, somehow, using 3306 and 5432 already for no reason. Maybe we should have each node version tests to run in a container as well, that way we use docker to connect themselves instead of using travis stuff.

Knex's dudes are into it as well, maybe i'll try and extend there as well.

One problem though, that oracledb stuff... It cries because a container doesn't have 1GB of memory available... Won't be easy.

@forstermatth

This comment has been minimized.

Copy link
Contributor

forstermatth commented Nov 14, 2017

Would using CircleCI 2.0 be an option?

@mrhwick mrhwick merged commit 9d3913b into bookshelf:master Nov 17, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

loryman added a commit to loryman/bookshelf that referenced this pull request Nov 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.