This allows developers to run all tests inside a docker container, turning docker the only dependency needed to run our tests in local and CI environment.
[x] reduce build time by ~1min 30s since we don't have to install GCC and compile packages in travis anymore.
[x] make sure local and ci test runs on the same environment by using docker
To run all tests in a local dev machine with neither leaking state between test runs nor having to install and configure mongodb/replicaSet just make sure you have docker installed and run:
It seems coveralls and travisCI have this recurring problem, I think we can migrate to code climate or codeCov if we need a test coverage tool. But as of right now I value having an easy way to run tests in local environment more than that.
I'm not familiar with db as shorthand - does that mean localhost - and will that play well with non-dockerized users?
db is an alias for the container ip in which mongodb is running. It should play well with non-dockeried users as long as they pass their mongodb connection string to the MONGODB_URL env var.
I think thats a big ask, since it works today without it. If db is not definied you should fall back to 127.xxx or localhost. I prefer 127
This allows developers to run all tests inside a docker container, turning docker the only dependency needed to run our tests in local and CI environment.
To run all tests in a local dev machine with neither leaking state between test runs nor having to install and configure mongodb/replicaSet just make sure you have docker installed and run:
docker-compose -f docker-compose.test.yml up
PS:
I had to remove coveralls integration due to this issue: https://github.com/lemurheavy/coveralls-public/issues/487
It seems coveralls and travisCI have this recurring problem, I think we can migrate to code climate or codeCov if we need a test coverage tool. But as of right now I value having an easy way to run tests in local environment more than that.
This change is