sudo: false
branches:
  except:
    - gh-pages
language: php
php:
  - 7.1.3 # 必须构建最低要求版本
  - 7.1
  - 7.2
  - 7.3
  - nightly # 每夜 PHP 构建，PHP 开发版本
env:
  - DB=mysql
  - DB=postgres
services:
  - mysql
  - postgres
cache:
  directories:
    - $HOME/.composer/cache
before_install:
  # Check and create database.
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database plus;' -U postgres; echo $DB; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS plus;'; echo $DB; fi"
  - php ./scripts/travis-ci-settings.php $DB
install:
  - composer install
  - php artisan app:key-generate
  - php artisan migrate -vvv
  - php artisan db:seed -vvv
  - php artisan vendor:publish --all -vvv
script: php vendor/bin/phpunit --coverage-clover=coverage.xml
after_script:
  - php vendor/bin/codacycoverage clover coverage.xml
  - bash <(curl -s https://codecov.io/bash)
jobs:
  include:
    - stage: Build
      name: Build Assets Test
      language: node_js
      node_js: 6
      cache:
        directories:
          - "node_modules"
      services: null
      env: null
      before_install: null
      install: npm install
      script: npm run dev
      after_script: null

sudo: false
branches:
  except:
    - gh-pages
language: php
php:
  - 7.1.3 # 必须构建最低要求版本
  - 7.1
  - 7.2
  - 7.3
env:
  - DB=mysql
  - DB=postgres
services:
  - mysql
  - postgres
cache:
  directories:
    - $HOME/.composer/cache
before_install:
  # Check and create database.
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database plus;' -U postgres; echo $DB; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS plus;'; echo $DB; fi"
  - php ./scripts/travis-ci-settings.php $DB
install:
  - composer install
  - php artisan app:key-generate
  - php artisan migrate -vvv
  - php artisan db:seed -vvv
  - php artisan vendor:publish --all -vvv
script: php vendor/bin/phpunit --coverage-clover=coverage.xml
after_script:
  - php vendor/bin/codacycoverage clover coverage.xml
  - bash <(curl -s https://codecov.io/bash)
jobs:
  include:
    - stage: Build
      name: Build Assets Test
      language: node_js
      node_js: 6
      cache:
        directories:
          - "node_modules"
      services: null
      env: null
      before_install: null
      install: npm install
      script: npm run dev
      after_script: null

Remove php nightly version build
chore(CI): Remove php nightly version build
