-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
80 lines (63 loc) · 1.6 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
sudo: false
language: php
php:
- 7.2
env:
matrix:
- DB=mysql
global:
- DEFAULT=1
- PHP=1
- PHPCS=0
- JS=0
matrix:
fast_finish: true
include:
- php: 7.2
- php: 7.2
env: PHPCS=1 DEFAULT=0
- php: 7.3
- php: 7.4
- language: node_js
env: JS=1 DEFAULT=0 PHP=0
node_js:
- node
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script: yarn travis
dist: bionic
services:
- mysql
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- phpenv config-rm xdebug.ini
- |
if [ $PHP = 1 ] && [ $DB = 'mysql' ]; then
mysql -u root -e 'CREATE DATABASE cakephp_test;';
echo 'DATABASE_TEST_URL="mysql://root:@127.0.0.1/cakephp_test"' >> config/.env;
fi
- |
if [ $PHP = 1 ]; then
pecl channel-update pecl.php.net;
echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
fi
- sudo locale-gen da_DK.UTF-8
install:
- if [ $PHP = 1 ]; then composer install --prefer-source --no-interaction; fi
- if [ $JS = 1 ]; then yarn; fi
before_script:
- if [ $PHPCS = 1 ]; then vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer; fi
script:
- if [ $DEFAULT = 1 ]; then vendor/bin/phpunit; fi
- if [ $PHPCS = 1 ]; then vendor/bin/phpcs; fi
- if [ $PHPCS = 1 ]; then vendor/bin/phpstan analyse -c phpstan.neon; fi
notifications:
email: false