diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa51ea05a4e6b9ba41b2429680944db1261387e0..311c114bf82b4eb417f93338fd358f83022e4125 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,15 @@ image: php:fpm-alpine services: - mysql:5.7 +stages: + - test + - deploy + +cache: + paths: + - vendor/ + + variables: HTTP_PROXY: "http://girvandip:91538874@cache.itb.ac.id:8080" MYSQL_DATABASE: lkqueue @@ -11,7 +20,7 @@ variables: before_script: - export http_proxy=${HTTP_PROXY} - export https_proxy=${HTTP_PROXY} - - apk update && apk add ca-certificates wget autoconf alpine-sdk && update-ca-certificates + - apk update && apk add icu-dev ca-certificates wget autoconf alpine-sdk && update-ca-certificates - pear config-set http_proxy ${HTTP_PROXY} - pear update-channels && pear upgrade --force - wget http://pecl.php.net/get/xdebug-2.6.0.tgz @@ -21,17 +30,30 @@ before_script: - ./configure - make && make install - cd .. - # - pecl install xdebug - docker-php-ext-enable xdebug - docker-php-ext-configure intl - docker-php-ext-install json intl mysqli - docker-php-ext-enable json intl mysqli debug - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer - - http_proxy=${HTTP_PROXY} https_proxy="" composer global require hirak/prestissimo - - http_proxy=${HTTP_PROXY} https_proxy="" composer install + - http_proxy=${HTTP_PROXY} composer global require hirak/prestissimo + - http_proxy=${HTTP_PROXY} composer install - php importersql.php test: script: - - composer run test + - composer test + +pages: + stage: deploy + dependencies: + - test + script: + - rm -rf public + - mv report public + artifacts: + paths: + - public + expire_in: 30days + only: + - master