mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Working on Travis, merging from #671
This commit is contained in:
parent
8735409753
commit
4a1bb71ea4
61
.travis.yml
Normal file
61
.travis.yml
Normal file
@ -0,0 +1,61 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- hhvm
|
||||
|
||||
addons:
|
||||
hosts:
|
||||
- ninja.dev
|
||||
|
||||
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
|
||||
|
||||
install:
|
||||
# install Composer dependencies
|
||||
- travis_retry composer update --prefer-dist;
|
||||
|
||||
before_script:
|
||||
# copy configuration files
|
||||
- cp tests/_bootstrap.php.default tests/_bootstrap.php
|
||||
- cp tests/.env.circleci .env
|
||||
# create the database and user
|
||||
- mysql -u root -e "create database IF NOT EXISTS ninja;"
|
||||
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
||||
# migrate and seed the database
|
||||
- php artisan migrate --no-interaction
|
||||
- php artisan db:seed --no-interaction # default seed
|
||||
- php artisan db:seed --no-interaction --class=UserTableSeeder # development seed
|
||||
# Start webserver on ninja.dev:8000
|
||||
- php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background
|
||||
# Start PhantomJS
|
||||
- phantomjs --webdriver=4444 & # '&' allows to run in background
|
||||
# Give it some time to start
|
||||
- sleep 5
|
||||
# Make sure the app is up-to-date
|
||||
- curl -L http://ninja.dev:8000/update
|
||||
|
||||
script:
|
||||
- php ./vendor/codeception/codeception/codecept run --html --debug
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
Loading…
Reference in New Issue
Block a user