Most CI services recommend you to use S3 or rsync as a way to store your coverage reports, or build artifacts. Instead, I decided to use Dropbox as a free and easy way.
This was done with a Rails project.
This has the additional advantage that you can share that particular dropbox directory with the team and everyone gets the latest version, automatically.
- Create a new dropbox app via https://www.dropbox.com/developers/apps/ (Make it a app restricted to its folder)
gem install dbox (on your local machine)
- Generate an access token using instructions on https://github.com/kenpratt/dbox
- Export all 4 DROPBOX_ variables to your CI server and your laptop (temporarily)
- Run dbox create coverage to create a coverage directory in your app folder on dropbox. Do this locally.
- Run your test cases once (locally)
cp -r html/* coverage/ # Assuming your coverage report is in html/ directory
cd coverage && dbox push # first push
- Write an after_build script on CI server, which uploads to dbox using
the following command
# Upload our coverage to dropbox
gem install dbox
dbox clone coverage
rm -rf coverage/assets/ # Delete any directories
mv coverage/* coverage/ # Copy all files
mv coverage/.[!.]* coverage/ # Move hidden files
This is just the basic gist. Feel free to modify as per your needs. Comment below if you face any issues implementing this.
*PS: * A restricted app folder cannot be shared as per Dropbox limitations. Instead what I have done is set up a symlink on my local machine as `Dropbox/appcoverage -> Dropbox/Apps/appcoverage/coverage/. This means my colleagues only get the latest coverage reports if my machine is running dropbox. However, its better than creating an unsandboxed app on Dropbox.