language: php
php:
  - 7.3
  - 7.4

addons:
  chrome: stable

before_install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && (cd && source ~/.nvm/nvm.sh) && nvm install

install:
  - cp .env.travis .env
  - travis_retry php composer.phar install --no-interaction --prefer-dist --no-suggest
  - php artisan key:generate
  - php artisan dusk:chrome-driver
  - nvm use
  - npm install
  - npm run prod

before_script:
  - php artisan serve &

script: 
  - php artisan test


language: php
php:
  - 7.3
  - 7.4

addons:
  chrome: stable

before_install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && (cd && source ~/.nvm/nvm.sh) && nvm install

install:
  - cp .env.travis .env
  - travis_retry php composer.phar install --no-interaction --prefer-dist --no-suggest
  - php artisan key:generate
  - php artisan dusk:chrome-driver
  - nvm use
  - npm install
  - npm run prod

before_script:
  - php artisan serve &
  - sleep 3 # give the PHP server time to start

script: 
  - php artisan test


Add sleep to Travis config
Add sleep to Travis config

I wonder if tests are failing because they start too soon after the PHP
server is started.
