Skip to content

Commit 317dfe2

Browse files
committed
Using composer package if possible
1 parent 71ae542 commit 317dfe2

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,15 @@ tests-php5.6:
2222
- name: "$CI_REGISTRY_IMAGE:server-test"
2323
alias: server_test
2424
script:
25-
- apk add --no-cache php5-cli php5-curl php5-gd php5-phar php5-json php5-openssl php5-dom php5-xml php5-zlib
25+
- apk add --no-cache composer php5-cli php5-curl php5-gd php5-phar php5-json php5-openssl php5-dom php5-xml php5-zlib
2626
- ln -s /usr/bin/php5 /usr/bin/php
2727
- php --version
28-
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
29-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
30-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
31-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
32-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
33-
- php composer.phar install
28+
- composer install
3429
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
3530
- vendor/bin/phpunit
3631
cache:
3732
key: php5.6
3833
paths:
39-
- composer.phar
4034
- vendor
4135

4236
tests-php7.0:
@@ -51,7 +45,6 @@ tests-php7.0:
5145
- php --version
5246
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
5347
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
54-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
5548
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
5649
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
5750
- php composer.phar install
@@ -75,7 +68,6 @@ tests-php7.1:
7568
- php --version
7669
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
7770
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
78-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
7971
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
8072
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
8173
- php composer.phar install
@@ -95,21 +87,15 @@ tests-php7.2:
9587
- name: "$CI_REGISTRY_IMAGE:server-test"
9688
alias: server_test
9789
script:
98-
- apk add --no-cache php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
90+
- apk add --no-cache composer php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
9991
- php --version
100-
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
101-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
102-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
103-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
104-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
105-
- php composer.phar install
92+
- composer install
10693
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
10794
- nohup php -S localhost:8000 -t tests/server/php-curl-test > phpd.log 2>&1 &
10895
- vendor/bin/phpunit
10996
cache:
11097
key: php7.2
11198
paths:
112-
- composer.phar
11399
- vendor
114100

115101
tests-php7.3:
@@ -119,19 +105,13 @@ tests-php7.3:
119105
- name: "$CI_REGISTRY_IMAGE:server-test"
120106
alias: server_test
121107
script:
122-
- apk add --no-cache php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
108+
- apk add --no-cache composer php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
123109
- php --version
124-
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
125-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
126-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
127-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
128-
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
129-
- php composer.phar install
110+
- composer install
130111
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
131112
- nohup php -S localhost:8000 -t tests/server/php-curl-test > phpd.log 2>&1 &
132113
- vendor/bin/phpunit
133114
cache:
134115
key: php7.3
135116
paths:
136-
- composer.phar
137117
- vendor

0 commit comments

Comments
 (0)