Prevent an Outdated and Broken bin/setup with This Simple Trick
Having a good bin/setup is very essential to having a quick onboarding time as well as getting your environment back up and going in case of emergency.
But how often do you run this
bin/setup if it’s only ran when you setup your repo? Most developers setup their environment only every once in awhile. What happens when changes to the codebase happen and the bin/setup isn’t modified as well?
Here at Rietta, we’ve found a way to ensure the bin/setup is always up to date and fully functional. We use our bin/setup in our initial setup for Continuous Integration.
This means we don’t allow our CI setup configuration to include anything except for dependency installation and our bin/setup!
Doing so much simplifies the CI configuration, at the cost of potentially re-running things that might not need to run. This technique also ensures our bin/setup works.
Using CircleCI the configuration to set up the entire app looks like this:
- run: name: Setup Project to Run command: | bundle exec bin/setup
After using our bin/setup to configure CI, we are now able to fix our broken bin/setup prior to Pull Requests being merged.