invoiceninja/.travis.yml

121 lines
5 KiB
YAML
Raw Normal View History

2016-02-17 17:47:46 +02:00
language: php
2016-02-18 13:42:07 +02:00
sudo: true
2016-02-17 17:47:46 +02:00
php:
2016-08-10 23:34:32 +03:00
# - 5.5.9
2016-05-29 14:22:25 +03:00
# - 5.6
2016-03-01 11:17:14 +02:00
# - 5.6
2017-01-10 12:41:07 +02:00
# - 7.0
2017-01-06 21:48:13 +11:00
- 7.1
2016-02-18 19:31:22 +02:00
# - hhvm
2016-02-17 17:47:46 +02:00
2016-02-18 12:20:43 +02:00
addons:
hosts:
2016-02-18 12:26:21 +02:00
- ninja.dev
2016-02-18 12:20:43 +02:00
2016-02-17 17:47:46 +02:00
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;
- composer self-update && composer -V
2016-05-26 20:53:13 +03:00
# - export USE_ZEND_ALLOC=0
2016-08-10 23:34:32 +03:00
- rvm use 1.9.3 --install --fuzzy
2016-02-17 17:47:46 +02:00
install:
# install Composer dependencies
2016-06-07 22:12:28 +03:00
# - rm composer.lock
2016-02-17 21:34:29 +02:00
# these providers require referencing git commit's which cause Travis to fail
2016-06-07 22:12:28 +03:00
# - sed -i '/mollie/d' composer.json
# - sed -i '/2checkout/d' composer.json
2016-02-17 18:49:40 +02:00
- travis_retry composer install --prefer-dist;
2016-02-17 17:47:46 +02:00
before_script:
2016-03-02 22:51:13 +02:00
# prevent MySQL went away error
2016-02-18 16:59:50 +02:00
- mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;'
2016-02-17 17:47:46 +02:00
# copy configuration files
2017-05-02 21:55:36 +03:00
- cp .env.travis .env
2016-02-17 17:47:46 +02:00
- cp tests/_bootstrap.php.default tests/_bootstrap.php
2016-02-17 22:17:55 +02:00
- php artisan key:generate --no-interaction
2016-05-04 09:53:43 +03:00
- sed -i '$a NINJA_DEV=true' .env
2016-02-17 17:47:46 +02:00
# create the database and user
2017-05-02 21:55:36 +03:00
- mysql -u root -e "create database IF NOT EXISTS ninja0;"
2017-05-02 22:23:06 +03:00
- mysql -u root -e "create database IF NOT EXISTS ninja;"
2017-05-02 21:55:36 +03:00
- mysql -u root -e "create database IF NOT EXISTS ninja2;"
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja0.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
2017-05-02 22:23:06 +03:00
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
2017-05-02 21:55:36 +03:00
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja2.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
2016-02-17 17:47:46 +02:00
# migrate and seed the database
2017-05-02 21:59:22 +03:00
- php artisan migrate --database=db-ninja-0 --seed --no-interaction
- php artisan migrate --database=db-ninja-1 --seed --no-interaction
- php artisan migrate --database=db-ninja-2 --seed --no-interaction
2016-02-17 17:47:46 +02:00
# Start webserver on ninja.dev:8000
2016-02-22 21:58:16 +02:00
- php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background
2016-02-17 17:47:46 +02:00
# Start PhantomJS
2016-02-18 13:36:47 +02:00
- phantomjs --webdriver=4444 & # '&' allows to run in background
2016-02-17 17:47:46 +02:00
# Give it some time to start
- sleep 5
2016-02-18 11:21:23 +02:00
# Make sure the app is up-to-date
2016-02-22 21:58:16 +02:00
- curl -L http://ninja.dev:8000/update
2017-03-13 09:17:06 +02:00
- php artisan ninja:create-test-data 4 true
2017-03-09 18:08:12 +02:00
- php artisan db:seed --no-interaction --class=UserTableSeeder # development seed
2017-05-02 22:10:05 +03:00
#- sed -i 's/DB_TYPE=db-ninja-1/DB_TYPE=db-ninja-2/g' .env
2016-02-17 17:47:46 +02:00
script:
2017-05-02 22:23:06 +03:00
#- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ExpenseCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance QuoteCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance OnlinePaymentCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance GatewayFeesCest.php
2017-03-22 22:45:47 +02:00
- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
2016-02-19 10:56:48 +02:00
2016-02-21 15:26:27 +02:00
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php
2016-02-17 17:47:46 +02:00
2016-02-17 22:42:31 +02:00
after_script:
2017-03-09 17:23:56 +02:00
- php artisan ninja:check-data --no-interaction
2016-02-21 12:28:41 +02:00
- cat .env
2017-05-02 21:55:36 +03:00
- mysql -u root -e 'select * from lookup_companies;' ninja0
- mysql -u root -e 'select * from lookup_accounts;' ninja0
- mysql -u root -e 'select * from lookup_contacts;' ninja0
- mysql -u root -e 'select * from lookup_invitations;' ninja0
2017-05-02 22:23:06 +03:00
- mysql -u root -e 'select * from accounts;' ninja
- mysql -u root -e 'select * from users;' ninja
- mysql -u root -e 'select * from account_gateways;' ninja
- mysql -u root -e 'select * from clients;' ninja
- mysql -u root -e 'select * from contacts;' ninja
- mysql -u root -e 'select * from invoices;' ninja
- mysql -u root -e 'select * from invoice_items;' ninja
- mysql -u root -e 'select * from invitations;' ninja
- mysql -u root -e 'select * from payments;' ninja
- mysql -u root -e 'select * from credits;' ninja
- mysql -u root -e 'select * from expenses;' ninja
- mysql -u root -e 'select * from accounts;' ninja
2016-04-27 17:10:27 +03:00
- cat storage/logs/laravel-error.log
- cat storage/logs/laravel-info.log
2017-03-13 09:30:20 +02:00
- FILES=$(find tests/_output -type f -name '*.png' | sort -nr)
2016-06-07 18:00:54 +03:00
- for i in $FILES; do echo $i; base64 "$i"; break; done
2016-02-17 22:42:31 +02:00
2016-02-17 17:47:46 +02:00
notifications:
email:
on_success: never
2016-05-25 21:28:41 +03:00
on_failure: change