Using postgression with travis-ci is easy if all you need to do is set $DATABASE_URL. Relying on the fact that things in the env section of .travis.yml are evaluated by a shell, you simply need:
env:
- DATABASE_URL=$(curl http://api.postgression.com)in your .travis.yml and $DATABASE_URL will be set properly for each build and available to all other parts of the build (before_script, script, etc).