2016-03-25 01:18:05 -07:00
|
|
|
addons:
|
2018-02-22 22:34:08 -08:00
|
|
|
code_climate:
|
|
|
|
repo_token:
|
|
|
|
secure: "C/bUAEpwfZB82dkzI2Nxx3PW5w/BzbKkSyCkp6YjT046jD2/QKvz6ngCFlt3tAWV11TXWFI6D8DzkMmdWOrQl3SGlPZXRD8QOvCiz0HiGMDvlxjAaPaQecGaQZdx/H4m6xTUXRNUVaYmxlMgkkFCWhAp+HZDs0iyOEVamp0Jszg="
|
2016-03-25 01:18:05 -07:00
|
|
|
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
|
|
|
|
|
2017-08-23 13:22:01 -07:00
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
# list any PHP version you want to test against
|
|
|
|
php:
|
2018-12-12 18:16:39 -08:00
|
|
|
- 7.2
|
|
|
|
- 7.3.0
|
2020-04-28 09:16:37 -07:00
|
|
|
- 7.4
|
2018-07-25 05:33:28 -07:00
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
# execute any number of scripts before the test run, custom env's are available as variables
|
|
|
|
before_script:
|
2018-02-22 21:46:58 -08:00
|
|
|
- phpenv config-add .github/travis-memory.ini
|
2016-03-25 01:18:05 -07:00
|
|
|
- phantomjs --webdriver=4444 &
|
2016-12-19 11:04:28 -08:00
|
|
|
- sleep 4
|
2017-08-23 13:32:30 -07:00
|
|
|
- mysql -e 'CREATE DATABASE snipeit_unit;'
|
2017-08-24 17:21:50 -07:00
|
|
|
- mysql -e 'CREATE USER "travis'@'localhost";'
|
|
|
|
- mysql -e 'GRANT ALL PRIVILEGES ON * . * TO "travis'@'localhost";'
|
|
|
|
- mysql -e 'FLUSH PRIVILEGES;'
|
2019-01-10 13:20:43 -08:00
|
|
|
- cp .env.testing-ci .env
|
2016-03-25 01:18:05 -07:00
|
|
|
- composer self-update
|
|
|
|
- composer install -n --prefer-source
|
|
|
|
- chmod -R 777 storage
|
2016-12-19 11:04:28 -08:00
|
|
|
- php artisan migrate --env=testing-ci --database=mysql --force
|
2016-03-25 01:18:05 -07:00
|
|
|
- ./vendor/bin/codecept build
|
2017-01-19 11:48:06 -08:00
|
|
|
- php artisan --env=testing-ci key:generate
|
2017-06-20 20:38:13 -07:00
|
|
|
- php artisan --env=testing-ci snipeit:travisci-install
|
2017-01-19 11:48:06 -08:00
|
|
|
- php artisan --env=testing-ci db:seed --database=mysql --force
|
2016-12-19 11:04:28 -08:00
|
|
|
- php artisan --env=testing-ci snipeit:create-admin --first_name=Alison --last_name=Foobar --email=me@example.com --username=snipe --password=password
|
2017-01-19 11:48:06 -08:00
|
|
|
- php artisan --env=testing-ci passport:install
|
2016-12-19 11:04:28 -08:00
|
|
|
- php artisan serve --env=testing-ci --port=8000 --host=localhost &
|
2016-03-25 01:18:05 -07:00
|
|
|
- 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-12-19 11:04:28 -08:00
|
|
|
# script: ./vendor/bin/codecept run --env testing-ci
|
2016-12-19 22:00:50 -08:00
|
|
|
script:
|
2017-10-01 12:59:55 -07:00
|
|
|
- ./vendor/bin/codecept run unit
|
2016-12-26 15:17:12 -08:00
|
|
|
# - ./vendor/bin/codecept run acceptance --env=testing-ci
|
2018-02-24 12:03:33 -08:00
|
|
|
- ./vendor/bin/codecept run functional --env=functional-travis -g func1
|
|
|
|
- ./vendor/bin/codecept run functional --env=functional-travis -g func2
|
2018-02-22 21:46:58 -08:00
|
|
|
- ./vendor/bin/codecept run api --env=functional-travis
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2018-02-22 22:34:08 -08:00
|
|
|
after_script:
|
|
|
|
- vendor/bin/test-reporter
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
after_success:
|
|
|
|
- codecov
|
|
|
|
|
|
|
|
after_failure:
|
2016-12-19 11:04:28 -08:00
|
|
|
- cat tests/_output/*.fail.html
|
2016-03-25 05:29:42 -07:00
|
|
|
- curl http://localhost:8000/login
|
2016-12-19 11:04:28 -08:00
|
|
|
- cat storage/logs/laravel.log
|
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
|