-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
49 lines (43 loc) · 1.68 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
language: php
services: mysql
sudo: false
cache:
directories:
- $HOME/.composer/cache
- ./vendor/bin/.phpunit
env:
global:
- SYMFONY_PHPUNIT_DIR=./vendor/bin/.phpunit
- SYMFONY_DEPRECATIONS_HELPER=29
matrix:
fast_finish: true
include:
- php: 7.4
before_install:
- composer self-update
- mysql -e "create database IF NOT EXISTS ilios;" -uroot
- echo $TRAVIS_PHP_VERSION
- echo "extension=apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- cp ${TRAVIS_BUILD_DIR}/.env.travis ${TRAVIS_BUILD_DIR}/.env.test.local
install:
- composer install --no-interaction --prefer-dist -d ${TRAVIS_BUILD_DIR}
before_script:
- bin/console doctrine:database:create --env=test
- bin/console doctrine:migrations:migrate --env=test --no-interaction
- bin/console doctrine:fixtures:load --env=test --no-interaction
- bin/console cache:clear --env=test --no-interaction
- bin/console cache:clear --env=dev --no-interaction
script:
# this checks that the source code follows the Symfony Code Syntax rules
- ./vendor/bin/phpcs --ignore=src/migrations src tests
# this checks that the YAML config files contain no syntax errors
- ./bin/console lint:yaml config
# this checks that the Twig template files contain no syntax errors
- ./bin/console lint:twig src
# this checks that Doctrine's mapping configurations are valid
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# run unit tests
- ./bin/phpunit --exclude-group=api tests
# this runs the static code analyzer
- ./vendor/bin/phpstan analyse --no-progress src