-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
77 lines (68 loc) · 2.35 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
language: php
dist: bionic # https://docs.travis-ci.com/user/reference/overview/#which-one-do-i-use
stages:
- smoke test 🕵️
- test
jobs:
include:
- stage: smoke test 🕵️
php: 7.3
env: DEPS='lowest' SYMFONY_DEPRECATIONS_HELPER='max[self]=2&max[direct]=2&max[indirect]=382'
-
php: 8.1
env: DEPS='unmodified' WITH_STATIC_ANALYSIS='yes' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
- stage: test
php: 7.3
env: SYMFONY_VERSION='4.4.*' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
-
php: 7.4
env: SYMFONY_VERSION='5.3.*' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
-
php: 8.0
env: SYMFONY_VERSION='5.4.*' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
-
php: 8.0
env: SYMFONY_VERSION='6.0.*' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
-
php: 8.1
env: SYMFONY_VERSION='6.1.*' MIN_STABILITY='dev' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
allow_failures:
- env: SYMFONY_VERSION='6.1.*' MIN_STABILITY='dev' SYMFONY_DEPRECATIONS_HELPER='max[indirect]=1'
fast_finish: true
services:
- mysql
- postgresql
install:
# set unlimited memory_limit
- INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo "memory_limit = -1" >> "${INI_FILE}"
# disable Xdebug for better Composer performance
- if php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi;
# install dependencies using Composer
- travis_wait bash .travis_install_dependencies.sh
# show installed dependencies
- composer show
before_script:
# set up MySQL
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -u root -e 'DROP USER "travis"@"localhost";'
- mysql -u root -e 'CREATE USER "travis"@"localhost" IDENTIFIED BY "";'
- mysql -u root -e 'GRANT ALL ON test.* TO "travis"@"localhost";'
- mysql -u root -e 'FLUSH PRIVILEGES;'
# set up PostgreSQL
- psql -c 'create database test;' -U postgres
script:
# validate composer.json
- if [ -n "${WITH_STATIC_ANALYSIS:-}" ]; then composer validate --strict --no-check-lock; fi;
# run PHPStan
- if [ -n "${WITH_STATIC_ANALYSIS:-}" ]; then vendor/bin/phpstan analyse; fi;
# run PHPUnit
- vendor/bin/phpunit -v
notifications:
email:
on_success: always
on_failure: always
# cache Composer's package cache
cache:
directories:
- $HOME/.composer/cache/files