/
.travis.yml
71 lines (63 loc) · 2.39 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
language: php
sudo: true
cache:
directories:
- "node_modules"
- $HOME/.composer/cache/files
- $HOME/.symfony
- ./bin/.phpunit
yarn: true
env:
global:
- SYMFONY_PHPUNIT_DIR=./bin/.phpunit
- SYMFONY_DEPRECATIONS_HELPER=9
- PATH="$HOME/.symfony/bin:$PATH"
matrix:
fast_finish: true
include:
- php: 8.2
before_install:
- '[[ -z $SYMFONY ]] || composer config extra.symfony.require "$SYMFONY"'
- if symfony self:version; then symfony self:update --yes ; else wget https://get.symfony.com/cli/installer -O - | bash ; fi
- sudo systemctl unmask mysql.service
- sudo service mysql start
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('new_password') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade -u root -pnew_password
- sudo service mysql restart
- sed -i -e 's/db_user:db_password/travis:/g' ./.env ./.env.test
- sed -i -e 's/db_name/travis/g' ./.env ./.env.test
- nvm install 16.13.0
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.5
- export PATH="$HOME/.yarn/bin:$PATH"
before_script:
- composer self-update
- phpenv config-rm xdebug.ini
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
install:
- COMPOSER_MEMORY_LIMIT=-1 composer update symfony/flex --no-plugins --no-scripts
- COMPOSER_MEMORY_LIMIT=-1 composer install
- yarn install
- yarn build
script:
- php bin/console app:install
- php bin/phpunit --testsuite=main
# this checks that the source code follows the Symfony Code Syntax rules
- ./vendor/bin/php-cs-fixer fix --diff --dry-run -v
# this checks that the YAML config files contain no syntax errors
- php bin/console lint:yaml config --parse-tags
# this checks that the Twig template files contain no syntax errors
- php bin/console lint:twig templates --env=prod
# this checks that the XLIFF translations contain no syntax errors
- php bin/console lint:xliff translations
# This checks that arguments injected into services match type declarations.
- php bin/console lint:container --no-debug
# This checks that the application doesn't use dependencies with known security vulnerabilities.
- symfony check:security
# this checks that Doctrine's mapping configurations are valid
- php bin/console doctrine:schema:validate -vvv --no-interaction