So I have had problems with this in the past and struggled to find much in terms of documentation. There is a bit here.
I think essentially it comes down to adding this to your travis.yml
services:
- postgresql
before_script:
- psql -c 'create database nameOfDB;' -U postgres
Maybe writing another script to set env and build db? I have this script in one of my projects
"pretest": "ENV=test npm run db-build",
So I have had problems with this in the past and struggled to find much in terms of documentation. There is a bit here.
I think essentially it comes down to adding this to your
travis.ymlMaybe writing another script to set env and build db? I have this script in one of my projects