X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=.gitlab-ci.yml;h=cd5ecb0d4a7de8b3933d96d7144fbd98dd178ea7;hb=e2b8c9273e09091c235959c25d8e4d8122aa6ca8;hp=d19f7b85205454c3caf6c111629e9de05a7fb6a4;hpb=7b55001eeeb326323d020dcfac2f864f8c3ad633;p=tt-rss.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d19f7b85..cd5ecb0d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,44 @@ -image: php:5.6 +phpmd: + image: php:5.6 + when: manual + script: + - sh utils/gitlab-ci/php-lint.sh + - curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar + - chmod +x /usr/bin/phpmd + - sh utils/gitlab-ci/phpmd.sh -before_script: - - curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar - - chmod +x /usr/bin/phpmd +schema: + image: fox/selenium-ci + when: manual + script: + - /etc/init.d/postgresql start + - /usr/local/sbin/init-database.sh + - sh ./utils/gitlab-ci/check-schema.sh -stages: - - test +phpunit_basic: + image: fox/selenium-ci + when: manual + script: + - /etc/init.d/postgresql start + - /usr/local/sbin/init-database.sh + - sh ./utils/gitlab-ci/check-schema.sh + - cp utils/gitlab-ci/config-template.php config.php + - su -s /bin/bash www-data -c "php ./update.php --debug-feed 1" + - wget -O /usr/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar + - chmod +x /usr/bin/phpunit + - phpunit tests/*.php -jobs: +phpunit_functional: + image: fox/selenium-ci when: manual - stage: test script: - - phpmd include text utils/gitlab-ci/phpmd-ruleset.xml - - phpmd classes text utils/gitlab-ci/phpmd-ruleset.xml - - FILES=$(ls -dm *.php | sed "s/ //g") && phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml + - /etc/init.d/postgresql start + - /etc/init.d/nginx start + - /etc/init.d/php5-fpm start + - /usr/local/sbin/init-database.sh + - sh ./utils/gitlab-ci/check-schema.sh + - ln -s `pwd` ../../tt-rss + - cp utils/gitlab-ci/config-template.php config.php + - chmod -R 777 cache lock feed-icons + - /usr/local/sbin/init-selenium.sh + - phpunit tests/functional/*.php