2018-10-05 09:51:37 +02:00
|
|
|
language: php
|
|
|
|
|
|
|
|
sudo: true
|
|
|
|
|
2019-04-24 03:12:27 +02:00
|
|
|
dist: xenial
|
|
|
|
|
2019-04-24 03:49:41 +02:00
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- xvfb
|
|
|
|
|
2018-10-05 09:51:37 +02:00
|
|
|
# Prevent tests from taking more than 50 minutes
|
|
|
|
group: deprecated-2017Q4
|
|
|
|
|
|
|
|
php:
|
2021-01-23 07:23:55 +01:00
|
|
|
# - 7.3
|
2020-01-30 05:50:45 +01:00
|
|
|
- 7.4
|
2019-10-05 02:11:04 +02:00
|
|
|
# - nightly
|
2018-10-05 09:51:37 +02:00
|
|
|
|
|
|
|
addons:
|
2019-04-24 03:27:51 +02:00
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libonig-dev
|
2019-04-24 03:12:27 +02:00
|
|
|
chrome: stable
|
2018-10-05 09:51:37 +02:00
|
|
|
hosts:
|
|
|
|
- www.ninja.test
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- COMPOSER_DISCARD_CHANGES=true
|
|
|
|
- COMPOSER_NO_INTERACTION=1
|
|
|
|
- COMPOSER_DISABLE_XDEBUG_WARN=1
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# set GitHub token and update composer
|
|
|
|
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
2021-01-23 09:51:29 +01:00
|
|
|
- composer self-update 1.10.19 && composer -V
|
2018-10-05 09:51:37 +02:00
|
|
|
# - export USE_ZEND_ALLOC=0
|
|
|
|
- rvm use 1.9.3 --install --fuzzy
|
2018-10-25 12:14:09 +02:00
|
|
|
- cp .env.travis .env
|
2018-10-05 09:51:37 +02:00
|
|
|
|
|
|
|
install:
|
|
|
|
# install Composer dependencies
|
|
|
|
# - rm composer.lock
|
|
|
|
# these providers require referencing git commit's which cause Travis to fail
|
|
|
|
# - sed -i '/mollie/d' composer.json
|
|
|
|
# - sed -i '/2checkout/d' composer.json
|
2019-01-27 23:54:25 +01:00
|
|
|
- travis_retry composer install --no-interaction
|
2018-10-05 09:51:37 +02:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
# copy configuration files
|
|
|
|
- php artisan key:generate --no-interaction
|
|
|
|
- sed -i '$a NINJA_DEV=true' .env
|
|
|
|
# create the database and user
|
2018-10-24 12:24:09 +02:00
|
|
|
- mysql -u root -e "create database IF NOT EXISTS ninja01;"
|
|
|
|
- mysql -u root -e "create database IF NOT EXISTS ninja02;"
|
|
|
|
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja01.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
|
|
|
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja02.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
2018-10-17 14:26:27 +02:00
|
|
|
# migrate and seed the database
|
2018-10-24 12:24:09 +02:00
|
|
|
- php artisan migrate --database=db-ninja-01 --seed --no-interaction
|
|
|
|
- php artisan migrate --database=db-ninja-02 --seed --no-interaction
|
2018-10-17 14:26:27 +02:00
|
|
|
- php artisan optimize
|
2018-10-29 05:24:12 +01:00
|
|
|
- npm install
|
|
|
|
- npm run production
|
2018-10-05 09:51:37 +02:00
|
|
|
# migrate and seed the database
|
|
|
|
# Start webserver on ninja.test:8000
|
2019-04-24 04:09:33 +02:00
|
|
|
# export DISPLAY=:99.0
|
|
|
|
# sh -e /etc/init.d/xvfb start
|
|
|
|
# sleep 3
|
2019-04-24 04:24:29 +02:00
|
|
|
# ./vendor/laravel/dusk/bin/chromedriver-linux &
|
2020-02-17 20:07:31 +01:00
|
|
|
- php artisan dusk:chrome-driver 80
|
2018-10-25 12:14:09 +02:00
|
|
|
- php artisan serve &
|
2018-10-05 09:51:37 +02:00
|
|
|
|
|
|
|
script:
|
2018-10-05 14:04:32 +02:00
|
|
|
- php ./vendor/bin/phpunit --debug --verbose --coverage-clover=coverage.xml
|
2021-01-23 07:23:55 +01:00
|
|
|
#- php artisan dusk
|
2019-07-17 05:09:37 +02:00
|
|
|
#- npm test
|
2018-10-05 13:59:09 +02:00
|
|
|
after_success:
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2018-10-05 14:04:32 +02:00
|
|
|
|
2018-10-05 09:51:37 +02:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|
|
|
|
on_failure: change
|
|
|
|
slack:
|
2018-10-05 13:59:09 +02:00
|
|
|
invoiceninja: SLraaKBDvjeRuRtY9o3Yvp1b
|