If you are writing a package to interface with an API that requires a secret key, it is not a good idea to include a copy of the secret key in your git repository. Wihtout the key however, you can't run automated tests. Travis-CI has a workaround for this, and I'll show you how to use it in Julia. First you need to install the travis gem, if you already have ruby installed this is simply gem install travis
. Next we're going to use the travis encrypt feature, go into the git reposity you want to access the key from and do
travis encrypt TEST_SECRET=secretvalue --add
This will add some information to your .travis.yml
file that looks like
env: