2019-05-09 00:20:43 +08:00
|
|
|
#
|
|
|
|
# Travis CI config file
|
|
|
|
#
|
|
|
|
|
2017-06-09 11:27:50 +08:00
|
|
|
language: php
|
|
|
|
php:
|
2019-05-08 23:41:27 +08:00
|
|
|
- '7.2'
|
|
|
|
- '7.3'
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
2019-05-09 00:17:38 +08:00
|
|
|
- php: '7.2'
|
|
|
|
- php: '7.3'
|
2019-05-08 23:41:27 +08:00
|
|
|
fast_finish: true
|
2017-12-29 07:32:40 +08:00
|
|
|
|
2018-01-03 04:45:55 +08:00
|
|
|
cache:
|
2019-05-09 00:20:43 +08:00
|
|
|
# Cache lives for 10 min
|
|
|
|
# Default of 3m might not be long enough for all the runs
|
2019-05-09 00:17:38 +08:00
|
|
|
timeout: 600
|
2018-01-03 04:45:55 +08:00
|
|
|
directories:
|
2018-02-03 05:39:53 +08:00
|
|
|
- "$HOME/.composer/cache"
|
|
|
|
- "$HOME/.npm"
|
2018-01-03 04:45:55 +08:00
|
|
|
|
2018-01-10 13:42:07 +08:00
|
|
|
services:
|
2018-02-03 05:39:53 +08:00
|
|
|
- mysql
|
2017-12-29 07:32:40 +08:00
|
|
|
|
2019-06-19 07:48:03 +08:00
|
|
|
install:
|
|
|
|
- composer install --dev --no-interaction --verbose
|
2018-01-10 13:55:47 +08:00
|
|
|
- cp .travis/env.travis.php env.php
|
2019-06-19 07:30:08 +08:00
|
|
|
- cp .travis/phpunit.travis.xml phpunit.xml
|
2019-05-08 23:36:04 +08:00
|
|
|
|
2019-06-19 07:48:03 +08:00
|
|
|
before_script:
|
2019-06-19 07:32:05 +08:00
|
|
|
- php artisan database:create --reset
|
|
|
|
- php artisan migrate:refresh --seed
|
2018-01-10 13:55:47 +08:00
|
|
|
|
|
|
|
script:
|
2019-05-13 02:26:44 +08:00
|
|
|
- vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no
|
2019-05-08 23:41:27 +08:00
|
|
|
- vendor/bin/phpunit --debug --verbose
|
2018-01-10 13:55:47 +08:00
|
|
|
|
|
|
|
after_failure:
|
2019-05-08 23:41:27 +08:00
|
|
|
- cat storage/logs/*.log
|
2018-01-10 13:55:47 +08:00
|
|
|
|
2018-01-10 13:51:40 +08:00
|
|
|
jobs:
|
|
|
|
include:
|
2019-05-09 00:17:38 +08:00
|
|
|
# Just packages up a release
|
2018-02-04 03:03:11 +08:00
|
|
|
- stage: package
|
2018-01-10 14:02:10 +08:00
|
|
|
script: skip
|
2019-05-09 00:03:52 +08:00
|
|
|
before_deploy:
|
|
|
|
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
|
2019-05-09 00:20:43 +08:00
|
|
|
|
2019-05-08 23:50:46 +08:00
|
|
|
# Configure the conditional deployment
|
|
|
|
# https://docs.travis-ci.com/user/deployment/#examples-of-conditional-deployment
|
2018-01-10 13:51:40 +08:00
|
|
|
deploy:
|
2018-02-04 03:03:11 +08:00
|
|
|
- provider: script
|
|
|
|
skip_cleanup: true
|
2018-02-04 03:50:08 +08:00
|
|
|
script: ./.travis/deploy_script.sh
|
2018-02-04 03:03:11 +08:00
|
|
|
on:
|
2019-05-09 00:18:50 +08:00
|
|
|
all_branches: true
|
2019-05-09 00:20:43 +08:00
|
|
|
repo: nabeelio/phpvms
|
2019-04-08 08:17:44 +08:00
|
|
|
php: '7.2'
|
2019-05-09 00:17:38 +08:00
|
|
|
|
|
|
|
# RELEASE STAGE
|
|
|
|
# Only runs when there's a tag applied to this release (tag should be the version)
|
|
|
|
# This uses Github Releases and posts it there (provider: releases)
|
|
|
|
# https://docs.travis-ci.com/user/deployment/releases
|
2018-02-04 03:16:37 +08:00
|
|
|
- stage: release
|
2018-02-03 05:09:37 +08:00
|
|
|
script: skip
|
|
|
|
before_deploy:
|
2019-05-09 00:03:52 +08:00
|
|
|
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
|
2018-02-03 05:39:53 +08:00
|
|
|
- ./.travis/deploy_script.sh
|
2018-02-03 05:09:37 +08:00
|
|
|
deploy:
|
2018-02-03 05:39:53 +08:00
|
|
|
provider: releases
|
2018-02-03 05:09:37 +08:00
|
|
|
skip_cleanup: true
|
2018-02-03 05:39:53 +08:00
|
|
|
api_key:
|
|
|
|
secure: kAOYEThsSF8wM7vx+e+xWKhlvsNzhgKn1bk0zLBb7RLUM5pHIGKV/j0KrCNspwIUEPF0O594H6hCyswlpIZfxW2mTnmPqfbKxG/H2rLEAoOV0/MqzeC/gffxm7Eop6Sn4T/UC9kLSgqRynllbYtJDK6aWESdnvK3Fka0Cnpn7l/2phEf2J/nOF6QT/utpws1E0MUGqrKvX1/UYIu8np5e5aYLPOXnqahK8qzJFL4CyNBv+fhXuXfmOF4UbNbSPnrg/kY0QpUtFpz9ebvg5BjfMXJT0P4Q1BjgKBN76A7vz+ZfPmW6SqKv3o1yisXAgBWzylXh8B6pK+cUk4uXbagcGcIdkGOI6pQ5sLq+JOkBhVjSfogERePkt44KPif4EMsLRw/Jp4pTMy/vmgrON/jkbA+jXsOARTG5vAwIq4lyZzZXWUfirYwXeCfasgf+xTdo9C0cOE0jlqojO7SdF2CinDk9BduYpBTectea8Xx+YP5R1JCZNORDYynlLHKMW/8PJyAG+AsbcfKNTobQAfxw1nHa7GoKP1j4MSx1UtbulZdhmeRX/nUTFIvfgEDrl4cdBlt0/o5SuyN92DiCnvJZaYHcgXwYMvoqdXxBCnBKsM/1BZcykWi7Zt/q8krWYCOfCzBN4TDdmrKsEOUkCSOL9mI6gERHGmcGZN05PxU950=
|
|
|
|
file_glob: true
|
2018-02-03 11:41:07 +08:00
|
|
|
file: build/*
|
2018-02-03 05:09:37 +08:00
|
|
|
on:
|
2018-02-04 03:16:37 +08:00
|
|
|
tags: true
|
|
|
|
repo: nabeelio/phpvms
|
2019-04-08 08:17:44 +08:00
|
|
|
php: '7.2'
|