snipe-it/.travis.yml

66 lines
2.2 KiB
YAML
Raw Normal View History

2016-03-25 01:18:05 -07:00
addons:
hosts:
- localhost
2016-03-25 05:21:45 -07:00
sudo: false
2016-03-25 01:18:05 -07:00
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
# list any PHP version you want to test against
php:
- 5.5
- 5.6
- 7.0
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
# - php -S localhost:8000 &
# - mkdir travis-phantomjs
# - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
# - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
# - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
2016-03-25 01:18:05 -07:00
- phantomjs --webdriver=4444 &
- sleep 10
2016-04-12 23:43:53 -07:00
- mysql -e "create database IF NOT EXISTS snipeit_unit;" -utravis
2016-03-25 01:18:05 -07:00
- composer self-update
- composer install -n --prefer-source
- cp .env.testing .env
- chmod -R 777 storage
- php artisan migrate --database=sqlite_testing --force
- ./vendor/bin/codecept build
- php artisan key:generate
- php artisan db:seed --database=sqlite_testing --force
- php artisan admin:create --first_name=Alison --last_name=Foobar --email=me@example.com --username=snipe --password=password
- php artisan serve --port=8000 --host=localhost &
- sleep 5
- pip install --user codecov
- sleep 5
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
2016-04-12 21:01:39 -07:00
script: ./vendor/bin/codecept run --env testing
2016-03-25 01:18:05 -07:00
# script: ./vendor/bin/codecept run unit
2016-04-12 21:01:39 -07:00
#script: ./vendor/bin/codecept run
2016-03-25 01:18:05 -07:00
after_success:
- codecov
after_failure:
- cat tests/_output/AccessoriesCept.fail.html
- curl http://localhost:8000/login
2016-04-12 21:01:39 -07:00
2016-03-25 01:18:05 -07:00
# configure notifications (email, IRC, campfire etc)
notifications:
email: false
slack:
secure: vv9we1RxB9RsrMbomSdq6D7vz/okobw87pEkgIZjB+hj1QpQ2by90gsPsOa+NgsJEFaEP7e4KlT6SH8kK+zhbmuKaUd3d1//XdcancE22LZXi6tkiB5yuR/Jhhb1LLDqyGJTB4D92hMnnCPiUjpxNA3r437ttNeYRdYIEEP3drA=
webhooks:
urls:
- https://webhooks.gitter.im/e/5e136eb0c1965f3918d0
on_success: change # options: [always|never|change] default: always
on_failure: change # options: [always|never|change] default: always
on_start: false # default: false