Database does not exist running Postgres

here’s my travis,yml file:

sudo: required
dist: trusty
language: node_js
env:
  - DB=gitPay
addons:
  artifacts:
    paths:
      - .karma/
      - ./mocha.js
before_script:
  - psql -c 'create database gitPay;' -U postgres
node_js:
  - "7.8.0"
services:
  - postgresql
  - mysql
before_install:
 - export CHROME_BIN=/usr/bin/google-chrome
 - export DISPLAY=:99.0
 - sh -e /etc/init.d/xvfb start
 - sudo apt-get update
 - sudo apt-get install -y libappindicator1 fonts-liberation
 - sudo apt-get install libgconf2-4 libnss3-1d libxss1
 - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 - sudo dpkg -i google-chrome*.deb
script:
    - npm run test
    - npm run test-unit

It triggers a failure like this exection, even creating the database successfully:
database "gitPay" does not exist any idea what’s going on here?

You are creating the database with the user postgres. Are your tests also running under that name? If so I’d suggest you change the user from postgres to something else.