]> git.wh0rd.org - tt-rss.git/blobdiff - .gitlab-ci.yml
pngcrush.sh
[tt-rss.git] / .gitlab-ci.yml
index d19f7b85205454c3caf6c111629e9de05a7fb6a4..cd5ecb0d4a7de8b3933d96d7144fbd98dd178ea7 100644 (file)
@@ -1,16 +1,44 @@
-image: php:5.6\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
-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
+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
-stages:\r
-  - test\r
+phpunit_basic:\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
+    - 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
-jobs:\r
+phpunit_functional:\r
+  image: fox/selenium-ci\r
   when: manual\r
-  stage: test\r
   script:\r
-    - phpmd include text utils/gitlab-ci/phpmd-ruleset.xml\r
-    - phpmd classes text utils/gitlab-ci/phpmd-ruleset.xml\r
-    - FILES=$(ls -dm *.php | sed "s/ //g") && phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml\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