Skip to content

Commit ac27a15

Browse files
committed
update travis config
1 parent 98dd4c7 commit ac27a15

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
language: php
22

3+
dist: xenial
4+
35
php:
46
- 7.2
57
- 7.3
6-
8+
- '7.4snapshot'
9+
710
sudo: false
811

12+
services:
13+
- postgresql
14+
- mysql
15+
16+
cache:
17+
directories:
18+
- vendor
19+
- $HOME/.composer/cache
20+
921
env:
1022
matrix:
11-
- DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
23+
- DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
1224
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
1325
- DB=sqlite db_dsn='sqlite:///:memory:'
1426

@@ -31,8 +43,8 @@ matrix:
3143
before_script:
3244
- composer self-update
3345
- composer install --prefer-dist --no-interaction
34-
- if [ $DB = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
35-
- if [ $DB = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
46+
- if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
47+
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
3648
- if [[ $PHPSTAN = 1 ]]; then composer stan-setup; fi
3749

3850
script:

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,18 @@
6060
"check": [
6161
"@cs-check",
6262
"@test",
63-
"@stan"
63+
"@analyse"
6464
],
65-
"cs-check": "phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
65+
"analyse": [
66+
"@stan",
67+
"@psalm"
68+
],
69+
"cs-check": "phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
6670
"cs-fix": "phpcbf --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
6771
"test": "phpunit --stderr",
68-
"stan": "phpstan analyse src/ && psalm --show-info=false",
69-
"psalm": "psalm --show-info=false",
70-
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.11 vimeo/psalm:^3.0 && mv composer.backup composer.json",
72+
"stan": "phpstan analyse src/",
73+
"psalm": "php vendor/psalm/phar/psalm.phar --show-info=false src/ ",
74+
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11.18 psalm/phar:^3.5 && mv composer.backup composer.json",
7175
"rector": "rector process src/",
7276
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:^0.4.11 && mv composer.backup composer.json",
7377
"coverage-test": "phpunit --stderr --coverage-clover=clover.xml"

0 commit comments

Comments
 (0)