pear:qa:ci

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
Next revisionBoth sides next revision
pear:qa:ci [2011/08/25 15:08] – [How to test a new PEAR release] CVS -> SVN danielcpear:qa:ci [2012/04/12 23:13] – [My unit tests need a (database/server/setup/configuration)] clockwerx
Line 6: Line 6:
   * [[http://test.pear.php.net/|Pearweb test installation]]   * [[http://test.pear.php.net/|Pearweb test installation]]
   * [[http://test.pear.php.net/unit-test-results/|Test results overview]]   * [[http://test.pear.php.net/unit-test-results/|Test results overview]]
-  * [[http://test.pear.php.net:8080/cruisecontrol/|Cruise Control/PHPUnderControl]]+  * [[http://test.pear.php.net:8080/|Jenkins]]
   * [[https://github.com/pear/pear-svn-git|Migrate to github script]]   * [[https://github.com/pear/pear-svn-git|Migrate to github script]]
  
-The helper scripts live at http://svn.php.net/viewvc/pear/ci/phpuc/trunk/+The helper scripts live at https://github.com/pear/phpuc/
  
-===== Cruise Control ===== +===== Jenkins ===== 
-Cruise Control is a continuous integration platform. Currently, all packages in both PEAR and PEAR2 are built by it+Jenkins is a continuous integration platform. Currently, all packages in both PEAR and PEAR2 are built by it.
- +
-The build task does: +
-  - Update svn +
-  - Run ''$ phpunit --log-junit ... tests/AllTests.php'' (if AllTests.php is present) +
-  - Run ''$ phpunit --log-junit ... tests/'' (if .phpt is present) +
-  - Run ''$ phpmd path/to/package/trunk xml codesize,unusedcode,naming --reportfile ...'' +
-  - Run ''$ phpcpd path/to/package/trunk --log-pmd ...'' +
-  - Run ''$ phpcs --report=checkstyle --standard=PEAR --ignore=tests path/to/package/trunk'' +
-  - Build the package with Pyrus ''$ php /path/to/pyrus.phar package -o .../trunk.tar.gz'' +
- +
-If either the unit tests or building the package fails, the build is marked as a failure. +
- +
-A file, called trunk.tar.gz is created as a build artifact.+
  
 ==== How do I make sure my tests work? ==== ==== How do I make sure my tests work? ====
Line 37: Line 24:
  
 ... or as per the phpunit command above. ... or as per the phpunit command above.
 +
 +http://jenkins-php.org/ is also worth a look.
  
 ==== My directory layout doesn't work === ==== My directory layout doesn't work ===
Line 55: Line 44:
 $ pear run-tests -r tests/ $ pear run-tests -r tests/
 $ phpunit tests/ $ phpunit tests/
-$ phpunit tests/AllTest.php 
  
 # Commit # Commit
Line 69: Line 57:
  - Checking your environment and skipping the test if it cannot run   - Checking your environment and skipping the test if it cannot run 
  
 +There is also a test mysql instance available.
 +
 +> Hi Daniel:
 +
 +> On Wed, Nov 16, 2011 at 08:34:04AM +1030, Daniel O'Connor wrote:
 +> > http://test.pear.php.net:8080/job/DB_DataObject/4/console
 +> >
 +> > This and a few others obviously need a database to be tested properly.
 +> > Certainly that machine has mysql on it; or sqlite is probably available -
 +> > what would be needed to load up an appropriate schema/tear it down after
 +> > the tests?
 +
 +> I agree and mentioned this on pear-qa a while ago.  Take a look at what
 +> I committed to DB tests yesterday.  It takes advantage of the
 +> MYSQL_TEST_* environment variables, which are used for PHP's tests.  We
 +> should create a test user and database and set those environment
 +> variables in the cron job, or whatever.
 +
 +> A similar setup should be made for PostgreSQL in PEAR and PHP's unit
 +> tests.  Right now, PHP's tests don't use such environment variables.
 +
 +> SQLite3 tests should use ":memory:" as the database.
 +
 +> Thanks,
 +
 +> --Dan
 ==== Todo ==== ==== Todo ====
-  - Fix how pear2-packages-all and pear2/all relate to the test suite +  - Put more packages into jenkins
-  - Generate a changelog, package.xml file (possibly in pearweb, possible on the command line) automatically; and build off of that. +
-  - Investigate what's up with the Metrics and other Cruise Control errors+
   - Investigate a notification task to package maintainers?   - Investigate a notification task to package maintainers?
   - Investigate allowing bootstrapped build.xml files back in (Pyrus)   - Investigate allowing bootstrapped build.xml files back in (Pyrus)
Line 89: Line 101:
 pear upgrade -f PEAR pear upgrade -f PEAR
 pear upgrade XML_RPC pear upgrade XML_RPC
-svn co http://svn.php.net/repository/pear/pear-core/trunk pear-core+git clone git://github.com/pear/pear-core.git
 cd pear-core/tests && pear run-tests -r cd pear-core/tests && pear run-tests -r
 </code> </code>
pear/qa/ci.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1