amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.58k stars 208 forks source link

Uses docker in travis build #1217

Closed coreycarvalho closed 4 years ago

coreycarvalho commented 4 years ago

Description of the Change

This change runs CI in Travis using docker. Unfortunately, there is a limitation in Travis that does not allow the pinning of a crystal version (it defaults to latest). This causes a mismatch in the version of crystal being run in CI vs the version of crystal that amber is expecting.

Alternate Designs

An alternate design was to use docker-compose instead of building the image and using a bunch of docker run commands. I opted not to use docker-compose, as some of the configurations in spec/support/config seemed like they were hardcoding the redis_url, and passing REDIS_URL within the docker-compose file did not seem to overwrite it. This caused tests to not be able to connect to Redis.

Benefits

Running the same version of crystal in CI that amber expects helps build more confidence in the test suite.

Possible Drawbacks

A slight increase in build time.

drujensen commented 4 years ago

@coreycarvalho thanks for fixing this! Now we just need to solve why crystal 0.35.1 broke it.