About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:testing:continuous_integration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:testing:continuous_integration [2016/06/07 16:55] – [Mink / Selenium / Zombie.js] demiankatzdevelopment:testing:continuous_integration [2021/05/06 11:30] (current) – [Travis CI] demiankatz
Line 16: Line 16:
   * [[http://jenkins-ci.org/|Jenkins Home Page]]   * [[http://jenkins-ci.org/|Jenkins Home Page]]
   * [[http://toptopic.wordpress.com/2009/02/26/php-and-hudson/|PHP + Hudson Article]]   * [[http://toptopic.wordpress.com/2009/02/26/php-and-hudson/|PHP + Hudson Article]]
-  * [[http://jenkins-php.org/|Template for Jenkins Jobs for PHP Projects]] +  * [[http://vufind.org/jenkins|VuFind's Jenkins Server]]
-  * [[http://vufind.org/hudson|VuFind's Jenkins Server]]+
  
-==== Travis CI ====+==== GitHub Actions / Travis CI ====
  
-[[http://travis-ci.org|Travis CI]] is a hosted continuous integration service with strong GitHub integration. While VuFind uses Jenkins for its primary CI functionality due to richer reporting capabilities, it also uses Travis as a first line of defense for detecting test breaks and style problems in pull requests.+[[https://github.com/features/actions|GitHub Actions]] and [[http://travis-ci.org|Travis CI]] are hosted continuous integration services with strong GitHub integration. While VuFind uses Jenkins for its primary CI functionality due to richer reporting capabilities, it also uses GitHub Actions or Travis as a first line of defense for detecting test breaks and style problems in pull requests. (VuFind used Travis for many years, but switched to GitHub Actions when Travis reduced its support for open source development).
 ==== Phing ==== ==== Phing ====
  
-Phing is a build tool designed as the PHP-based answer to [[http://ant.apache.org/|Apache Ant]].  It can be integrated with Hudson just as Maven can.  We currently use Phing to set up our Selenium test environment and to generate several of Hudson's reports.+Phing is a build tool designed as the PHP-based answer to [[http://ant.apache.org/|Apache Ant]].  It can be integrated with Jenkins just as Maven can.  We currently use Phing to set up our Selenium test environment and to generate several of Jenkins's reports.
  
 Resources: Resources:
Line 35: Line 34:
 ==== Mink / Selenium ==== ==== Mink / Selenium ====
  
-We use Mink (a browser automation abstraction library) with Selenium (a browser automation library) for building automated browser-based tests.  This is useful for integration testing, although complex tests can sometimes take a very long time to execute. See [[development:testing:unit_tests#browser_automation_tests_with_mink|this wiki page]] for more details.+We use Mink (a browser automation abstraction library) with either Chrome in headless mode or Selenium (a browser automation library) for building automated browser-based tests.  This is useful for integration testing, although complex tests can sometimes take a very long time to execute. See [[development:testing:unit_tests#browser_automation_tests_with_mink|this wiki page]] for more details.
  
 Resources: Resources:
   * [[http://mink.behat.org/|Mink Home Page]]   * [[http://mink.behat.org/|Mink Home Page]]
   * [[http://www.seleniumhq.org/|Selenium Home Page]]   * [[http://www.seleniumhq.org/|Selenium Home Page]]
-  * [[http://zombie.labnotes.org/|Zombie.js Home Page]]+
  
 ===== Setting up Jenkins ===== ===== Setting up Jenkins =====
Line 106: Line 105:
 Install ImageMagick development package (e.g. ImageMagick-devel). Install ImageMagick development package (e.g. ImageMagick-devel).
  
-Install phpunit and phpcpd +Install [[http://getcomposer.org|Composer]]
- +  * It used to be necessary to install a large number of tools to get Continuous Integration working, but VuFind's composer.json now does all of that work for youAs long as Composer is installed in a location accessible to Jenkins, the rest should happen automatically.
-    pear channel-discover pear.phpunit.de +
-    pear install --alldeps phpunit/PHPUnit +
- +
-Install phpcpd +
- +
-    pear channel-discover pear.symfony.com +
-    pear channel-discover pear.netpirates.net +
-    pear install phpunit/phpcpd +
- +
-Install phpdoc +
- +
-    pear channel-discover pear.phpdoc.org +
-    pear install phpdoc/phpDocumentor +
- +
-Install phpmd +
- +
-    pear channel-discover pear.pdepend.org +
-    pear channel-discover pear.phpmd.org +
-    pear install phpmd/PHP_PMD +
- +
-Install phpcs +
- +
-    pear install PHP_CodeSniffer +
- +
-Install phploc +
-    pear install phpunit/phploc+
  
 Install GraphViz (optional) Install GraphViz (optional)
-  * Get a recent version. E.g. the version in CentOS 6 (2.26) doesn't always work properly. Or leave it out altogether.+  * GraphViz can be used to draw some graphs as part of the PhpDocumentor process; however, it doesn't always work properly. If you encounter errors during documentation generation, it is actually better to leave it out altogether.
  
 ==== Configure Jenkins ==== ==== Configure Jenkins ====
Line 162: Line 135:
   * Build triggers:   * Build triggers:
     * [x] Build when a change is pushed to GitHub (note that you need to configure the hooks: https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin#GitHubPlugin-TriggerabuildwhenachangeispushedtoGitHub)     * [x] Build when a change is pushed to GitHub (note that you need to configure the hooks: https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin#GitHubPlugin-TriggerabuildwhenachangeispushedtoGitHub)
 +  * Execute shell [this must run BEFORE Phing]:
 +    * composer install
   * Build / Invoke Phing targets:   * Build / Invoke Phing targets:
 +    * Phing version: Be sure to set up a custom Phing installation in Manage Jenkins / Configure System. This should have a PHP Command setting of "$WORKSPACE/vendor/bin/phing" to run the version of Phing installed by Composer.
     * Targets: main     * Targets: main
     * If you need to customize the build file, click Advanced... and enter your custom build file name in "Phing Build File"     * If you need to customize the build file, click Advanced... and enter your custom build file name in "Phing Build File"
Line 175: Line 151:
    
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
development/testing/continuous_integration.1465318527.txt.gz · Last modified: 2016/06/07 16:55 by demiankatz