-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (79 loc) · 2.84 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
81
82
83
84
85
86
87
88
89
90
91
language: php
cache:
directories:
- $HOME/.composer/cache/files
addons:
apt:
packages:
- ghostscript
env:
global:
- PHPUNIT_FLAGS="-v"
- SYMFONY_DEPRECATIONS_HELPER="max[self]=0"
before_install:
- yes | pecl install imagick
- sudo sed -i -e 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>/' /etc/ImageMagick-6/policy.xml
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- travis_retry composer self-update
- composer global require symfony/flex
install:
- composer update $COMPOSER_FLAGS --prefer-dist --no-progress --no-suggest --ansi
before_script:
- |
if [[ $COVERAGE = true ]]; then
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
fi
script: ./vendor/bin/phpunit $PHPUNIT_FLAGS
after_script:
- |
if [[ $COVERAGE = true ]]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
jobs:
include:
# Test lowest dependencies
- stage: Test
php: 7.1
env:
- SYMFONY_REQUIRE='^3.4'
- COMPOSER_FLAGS="--prefer-lowest"
- SYMFONY_DEPRECATIONS_HELPER="max[direct]=1" # Workaround for BC layer triggering a deprecation in Group entity
# Test latest php with LTS versions.
- stage: Test
php: 7.3
env: SYMFONY_REQUIRE='^3.4'
- stage: Test
php: 7.3
env: SYMFONY_REQUIRE='^4.4'
# Test the latest stable release
- stage: Test
php: 7.1
- stage: Test
php: 7.2
- stage: Test
php: 7.3
- stage: Test
php: 7.4
env:
- COVERAGE=true
- PHPUNIT_FLAGS="-v --coverage-clover=coverage.clover"
# Validate frontend setup
- stage: Test
language: javascript
cache:
npm: false
before_install:
# Remove any twig syntax from the groundcontrol package.json
- sed -i -e 's/{% if demosite %}//g' src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/package.json
- sed -i -e 's/{% endif %}//g' src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/package.json
- sed -i -e 's/"name".*/"name":"demo",/g' src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/package.json
install:
- npm install
before_script: skip
script:
- npm run build -- --continueAfterTestError=true
- npm run buildGroundControlSkeleton
after_script: skip