-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (50 loc) · 1.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
language: php
dist: xenial
sudo: false
services:
- mysql
addons:
apt:
packages:
- libxml2-utils
php:
- 7.1
- 7.2
- 7.3
matrix:
allow_failures:
- php: master
fast_finish: true
env:
matrix:
- LARAVEL_VERSION=5.6.*
- LARAVEL_VERSION=5.7.*
- LARAVEL_VERSION=5.8.*
global:
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
cache:
directories:
- $HOME/.composer/cache/files
before_script:
- mysql_upgrade -u root
- mysql -h localhost -e "CREATE DATABASE forge;"
- mysql -h localhost -e "CREATE USER forge@localhost"
- mysql -h localhost -e "GRANT ALL PRIVILEGES ON forge.* TO forge@localhost;"
- mysql -h localhost -e "FLUSH PRIVILEGES;"
- if [ "$LARAVEL_VERSION" != "" ]; then composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-update; fi;
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- composer global require amethyst/cli
- export PATH="$HOME/.composer/vendor/bin:$PATH"
script:
- amethyst test --verbose
jobs:
include:
- stage: Quality
php: 7.2
script: composer update && amethyst test:phpstan --verbose
- stage: Style
php: 7.2
script: composer update && amethyst test:style --verbose