-image: php:5.6\r
-\r
-before_script:\r
- - curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar\r
- - chmod +x /usr/bin/phpmd\r
+phpmd:\r
+ image: php:5.6\r
+ when: manual\r
+ script:\r
+ - sh utils/gitlab-ci/php-lint.sh\r
+ - curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar\r
+ - chmod +x /usr/bin/phpmd\r
+ - sh utils/gitlab-ci/phpmd.sh\r
\r
-stages:\r
- - test\r
+schema:\r
+ image: fox/selenium-ci\r
+ when: manual\r
+ script:\r
+ - /etc/init.d/postgresql start\r
+ - /usr/local/sbin/init-database.sh\r
+ - sh ./utils/gitlab-ci/check-schema.sh\r
\r
-jobs:\r
+phpunit_basic:\r
+ image: fox/selenium-ci\r
when: manual\r
- stage: test\r
script:\r
- - phpmd.phar include text utils/gitlab-ci/phpmd-ruleset.xml \r
- - phpmd.phar classes text utils/gitlab-ci/phpmd-ruleset.xml \r
+ - /etc/init.d/postgresql start\r
+ - /usr/local/sbin/init-database.sh\r
+ - sh ./utils/gitlab-ci/check-schema.sh\r
+ - cp utils/gitlab-ci/config-template.php config.php\r
+ - su -s /bin/bash www-data -c "php ./update.php --debug-feed 1"\r
+ - wget -O /usr/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar\r
+ - chmod +x /usr/bin/phpunit\r
+ - phpunit tests/*.php\r
\r
+phpunit_functional:\r
+ image: fox/selenium-ci\r
+ when: manual\r
+ script:\r
+ - /etc/init.d/postgresql start\r
+ - /etc/init.d/nginx start\r
+ - /etc/init.d/php5-fpm start\r
+ - /usr/local/sbin/init-database.sh\r
+ - sh ./utils/gitlab-ci/check-schema.sh\r
+ - ln -s `pwd` ../../tt-rss\r
+ - cp utils/gitlab-ci/config-template.php config.php\r
+ - chmod -R 777 cache lock feed-icons\r
+ - /usr/local/sbin/init-selenium.sh\r
+ - phpunit tests/functional/*.php\r