forked from zikula/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
102 lines (86 loc) · 4.59 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
92
93
94
95
96
97
98
99
100
101
102
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly
matrix:
fast_finish: true
allow_failures:
- php: 7.2
- php: nightly
services:
- mysql
before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then phpenv config-rm xdebug.ini; fi;
# load memcache.so for php 5
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [ $(php -r "echo PHP_MAJOR_VERSION;") == 5 ]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Continuing without memcache extension"; fi;
# load memcache.so for php >= 7.1
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [ $(php -r "echo PHP_MAJOR_VERSION;") == 7 ] && [ $(php -r "echo PHP_MINOR_VERSION;") >= 1 ]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Continuing without memcache extension"; fi;
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
- composer install -o --no-scripts
- composer run-script post-autoload-dump
- composer run-script post-install-cmd
- cd src
- php bin/console lint:yaml app/config/
- php bin/console lint:yaml system/
- php bin/console lint:yaml themes/
- php bin/console lint:yaml lib/Zikula/
- php bin/console lint:twig system/ lib/Zikula/
# twig linting in themes won't work because the themes are not active bundles
- cd ..
- ./bin/simple-phpunit
- cd src
# extract en translations
- php -dmemory_limit=2G bin/console translation:extract en --output-format=po --output-dir=app/Resources/translations --enable-extractor=jms_i18n_routing --dir=system --dir=lib/Zikula/Bundle
install:
# create test db
- mysql -e 'create database zk_test;'
# run the installer
- php bin/console zikula:install:start -n --database_user=root --database_name=zk_test --password=12345678 [email protected] --router:request_context:host=localhost
- php bin/console zikula:install:finish
# drop the test db
- mysql -e 'drop database zk_test'
# create an upgrade db for 143
- mysql -e 'create database zk_test;'
- mysql zk_test < ../test_dbs/core143.sql
# run the upgrade from the 143 db
- 'sed -i -E "s/core_installed_version:(.*)/core_installed_version: ''1.4.3''/" app/config/custom_parameters.yml'
- php bin/console zikula:upgrade -n --username=admin --password=12345678 --router:request_context:host=localhost --router:request_context:scheme=http --router:request_context:base_url='/'
# drop the test db
- mysql -e 'drop database zk_test'
# create an upgrade db for 144
- mysql -e 'create database zk_test;'
- mysql zk_test < ../test_dbs/core144.sql
# run the upgrade from the 144 db
- 'sed -i -E "s/core_installed_version:(.*)/core_installed_version: ''1.4.4''/" app/config/custom_parameters.yml'
- php bin/console zikula:upgrade -n --username=admin --password=12345678 --router:request_context:host=localhost --router:request_context:scheme=http --router:request_context:base_url='/'
# drop the test db
- mysql -e 'drop database zk_test'
# create an upgrade db for 145
- mysql -e 'create database zk_test;'
- mysql zk_test < ../test_dbs/core145.sql
# run the upgrade from the 145 db
- 'sed -i -E "s/core_installed_version:(.*)/core_installed_version: ''1.4.5''/" app/config/custom_parameters.yml'
- php bin/console zikula:upgrade -n --username=admin --password=12345678 --router:request_context:host=localhost --router:request_context:scheme=http --router:request_context:base_url='/'
# drop the test db
- mysql -e 'drop database zk_test'
# create an upgrade db for 146
- mysql -e 'create database zk_test;'
- mysql zk_test < ../test_dbs/core146.sql
# run the upgrade from the 146 db
- 'sed -i -E "s/core_installed_version:(.*)/core_installed_version: ''1.4.6''/" app/config/custom_parameters.yml'
- php bin/console zikula:upgrade -n --username=admin --password=12345678 --router:request_context:host=localhost --router:request_context:scheme=http --router:request_context:base_url='/'
# drop the test db
- mysql -e 'drop database zk_test'
script:
- cd ..
# execute Symfony deprecation detector
- git clone https://github.com/sensiolabs-de/deprecation-detector.git
- cd deprecation-detector
- composer install
- ./bin/deprecation-detector check ../src ../src/vendor