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

ci: Ensure Appraisal fetches latest version of dependencies #1086

Merged
merged 1 commit into from
Jun 18, 2020

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Jun 17, 2020

appraisal install runs bundle check first, then bundle install if bundle check returned false:

bundle exec appraisal install
>> bundle check --gemfile='gemfiles/rails5_mysql2.gemfile' || bundle install --gemfile='gemfiles/rails5_mysql2.gemfile'

bundle check returns true if the gems currently installed in the system can fulfill the Gemfile.lock (or simply the Gemfile, if a lock file is absent).

When bundle check runs the for first time in our CI, there is no Gemfile.lock available, so it tries to satisfy the Gemfile dependencies, which are lenient (e.g. gem 'excon'), and bundle check will consider that dependency fulfilled as long as a version that satisfies the version constraint is installed.

In contrast, bundle install will always try to fetch the latest version from the remote, and will skip downloading it if it is already present.

Unfortunately, there's no API to invoke appraisal install without bundle check.

This PR cleans up any existing appraisal Gemfiles, with appraisal clean, which ensures bundle check returns false (without a Gemfile, bundle check fails), and ensuring bundle install runs for all Appraisal combinations.

@marcotc marcotc added the dev/ci Involves CircleCI, GitHub Actions, or GitLab label Jun 17, 2020
@marcotc marcotc requested a review from a team June 17, 2020 18:36
@marcotc marcotc self-assigned this Jun 17, 2020
@marcotc marcotc merged commit d0c26ec into master Jun 18, 2020
@marcotc marcotc deleted the ci/clean-before-appraisal branch June 18, 2020 15:48
@marcotc marcotc added this to the 0.37.0 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/ci Involves CircleCI, GitHub Actions, or GitLab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants