I've just set up a Ruby on Rails app on Heroku, but, I'm experiencing a CI setup performance problem, which is quite annoying.
During the setup of our unit tests, Heroku is always re-installing our gems, producing logs like:
Fetching activestorage 6.0.2.2
Installing activestorage 6.0.2.2
This is not the case when setting up our app, as it shows lines like this instead:
Using activestorage 6.0.2.2
In both cases, bundler looks to be called with the correct arguments:
(for CI setup)
Running: bundle install --without development --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
(for app setup)
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
In both cases, we're having the line:
Bundled gems are installed into `./vendor/bundle`
So, I'm wondering: do you know why Heroku does not cache gems between CI test setups, while it's the case during consequent builds of our app? If yes, is there a way to force the reuse of gems previously installed in our CI pipeline? This is taking a lot of time and can benefit from that.
Thanks a lot
- DEV Community Build a CI/CD pipeline with Heroku CI. Heroku CI automatically runs your app’s test suite with every push to your app’s GitHub repository, enabling you to easily review test results before merging or deploying changes to your codebase. Besides strong Dev/prod parity, using Heroku CI comes with many benefits key of which include;
Seamlessly integrated with Heroku Pipelines, it completes Heroku Flow to provide a unified solution for continuous integration/continuous delivery. On every push to GitHub, Heroku CI immediately runs your tests on Performance Dynos in a disposable Heroku app, so there’s never a wait time for a free CI worker.
If you’re using GitHub, you can turn on Heroku CI, Heroku’s visual, low-configuration test runner that integrates easily with Heroku Pipelines. Any Heroku Pipeline is already CI-ready – just turn it on in the pipeline’s Settings tab.
A Heroku app can belong to exactly one stage of exactly one pipeline. From your pipeline’s overview page, click + Add app next to a deployment stage to add an existing application to that stage of the pipeline. Add an app to your pipeline with the heroku pipelines:add command:
After asking Heroku's team, it was a bug in the ruby's buildpack. This is now fixed, and works well. Buildpack creators can cache data between CI build, it was just turned off during one of their upgrade.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With