File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,33 +38,77 @@ deploy:
3838 DEPLOYMENT_RULES_VERSION : master
3939 DEPLOYMENT_RULES_FILE : platform.yml
4040
41- test :
42- build :
43- image : test
41+
42+ mysql/base : &_mysql_base
43+ image : mysql:5.7
44+ environment :
45+ - MYSQL_DATABASE=ushahidi
46+ - MYSQL_USER=ushahidi
47+ - MYSQL_PASSWORD=ushahidi
48+ - MYSQL_ROOT_PASSWORD=root
49+ mysql-7.1 :
50+ << : *_mysql_base
51+ mysql-7.2 :
52+ << : *_mysql_base
53+ mysql-7.3 :
54+ << : *_mysql_base
55+
56+
57+ test/base : &_test_defaults
58+ build : &_test_build_defaults
4459 dockerfile_path : docker/test.Dockerfile
4560 volumes :
4661 - .:/vols/src
47- depends_on :
48- - mysql
49- environment :
50- - DB_HOST=mysql
51- - DB_PORT=3306
52- - DB_DATABASE=ushahidi
53- - DB_USERNAME=ushahidi
54- - DB_PASSWORD=ushahidi
55- - KOHANA_ENV=testing
62+ environment : &_test_env_defaults
63+ DB_PORT : 3306
64+ DB_DATABASE : ushahidi
65+ DB_USERNAME : ushahidi
66+ DB_PASSWORD : ushahidi
67+ KOHANA_ENV : testing
5668 extra_hosts :
5769 - " ushahidi.dev:127.0.0.1"
5870 cached : true
5971 default_cache_branch : develop
6072
61- mysql :
62- image : mysql:5.7
73+ test/php-7.1 :
74+ << : *_test_defaults
75+ build :
76+ << : *_test_build_defaults
77+ image : test-7.1
78+ args :
79+ PHP_MAJOR_VERSION : " 7.1"
6380 environment :
64- - MYSQL_DATABASE=ushahidi
65- - MYSQL_USER=ushahidi
66- - MYSQL_PASSWORD=ushahidi
67- - MYSQL_ROOT_PASSWORD=root
81+ << : *_test_env_defaults
82+ DB_HOST : mysql-7.1
83+ depends_on :
84+ - mysql-7.1
85+
86+ test/php-7.2 :
87+ << : *_test_defaults
88+ build :
89+ << : *_test_build_defaults
90+ image : test-7.2
91+ args :
92+ PHP_MAJOR_VERSION : " 7.2"
93+ environment :
94+ << : *_test_env_defaults
95+ DB_HOST : mysql-7.2
96+ depends_on :
97+ - mysql-7.2
98+
99+ test/php-7.3 :
100+ << : *_test_defaults
101+ build :
102+ << : *_test_build_defaults
103+ image : test-7.3
104+ args :
105+ PHP_MAJOR_VERSION : " 7.3"
106+ depends_on :
107+ - mysql-7.3
108+ environment :
109+ << : *_test_env_defaults
110+ DB_HOST : mysql-7.3
111+
68112
69113aglio :
70114 image : humangeo/aglio
Original file line number Diff line number Diff line change 11- name : " Test"
2- service : test
3- command : test_reporter composer run test --timeout 0
2+ type : parallel
3+ steps :
4+ - name : " Test PHP 7.1"
5+ service : test/php-7.1
6+ command : test_reporter composer run test --timeout 0
7+ - name : " Test PHP 7.2"
8+ service : test/php-7.2
9+ command : test_reporter composer run test --timeout 0
10+ - name : " Test PHP 7.3"
11+ service : test/php-7.3
12+ command : test_reporter composer run test --timeout 0
13+
414
515- type : parallel
616 steps :
Original file line number Diff line number Diff line change 1515 }
1616 ],
1717 "require" : {
18- "php" : " >=7.0 <=7.3 " ,
18+ "php" : " >=7.0 <7.4 " ,
1919 "aura/di" : " ~3.4" ,
2020 "league/flysystem-aws-s3-v3" : " ~1.0" ,
2121 "league/flysystem-rackspace" : " ~1.0" ,
Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ function run_composer_install {
6363}
6464
6565function wait_for_mysql {
66- local db_host=${DB_HOST:- mysql }
66+ local db_host=${DB_HOST}
6767 local db_port=${DB_PORT:- 3306}
6868 until nc -z $db_host $db_port ; do
69- >&2 echo " Mysql is unavailable - sleeping"
69+ >&2 echo " Mysql ( $db_host : $db_port ) is unavailable - sleeping"
7070 sleep 1
7171 done
7272}
Original file line number Diff line number Diff line change 1- FROM ushahidi/php-ci:php-7.0
1+ ARG PHP_MAJOR_VERSION
2+ FROM ushahidi/php-ci:php-${PHP_MAJOR_VERSION}
23
34WORKDIR /var/www
45COPY composer.json ./
You can’t perform that action at this time.
0 commit comments