2017-10-26 23:24:33 +08:00
|
|
|
language: php
|
2017-07-20 15:56:42 +08:00
|
|
|
|
|
|
|
git:
|
|
|
|
submodules: false
|
2017-07-31 13:48:01 +08:00
|
|
|
|
2017-10-26 23:24:33 +08:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
- node_modules
|
|
|
|
|
|
|
|
env:
|
|
|
|
global: APP_ENV=testing DB_HOST=localhost DB_USERNAME=root DB_PASSWORD= DB_DATABASE=blessing_test
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- if [[ $TEST_TYPE == 'php' ]]; then mysql -e 'CREATE DATABASE blessing_test;' ; fi
|
|
|
|
|
|
|
|
install:
|
|
|
|
- composer install
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- if [[ $TEST_TYPE == 'php' ]]; then php artisan key:generate ; fi
|
|
|
|
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- php: 5.6
|
|
|
|
env: TEST_TYPE=php
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- php: 7.0
|
|
|
|
env: TEST_TYPE=php
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
|
|
|
|
after_success:
|
|
|
|
- bash <(curl -s https://codecov.io/bash) -cF php
|
|
|
|
- php: 7.1
|
|
|
|
env: TEST_TYPE=php
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- node_js: 8
|
|
|
|
language: node_js
|
|
|
|
node_js: 8
|
|
|
|
env: TEST_TYPE=js
|
|
|
|
install:
|
|
|
|
- yarn
|
|
|
|
script:
|
|
|
|
- yarn run lint
|
|
|
|
- yarn test:coverage
|
|
|
|
after_success:
|
|
|
|
- yarn run codecov
|