项目作者: splitbrain

项目描述 :
Environment setup script for testing DokuWiki plugins on travis-ci
高级语言: Shell
项目地址: git://github.com/splitbrain/dokuwiki-travis.git
创建时间: 2014-01-04T14:48:52Z
项目社区:https://github.com/splitbrain/dokuwiki-travis

开源协议:

下载


Travis CI testing for DokuWiki plugins

This repository contains a script that can be used in
Travis CI or Gitlab-CI
to setup the DokuWiki environment to test a single plugin.

Setup

Use it like this in .travis.yml:

  1. language: php
  2. php:
  3. - "7.4"
  4. - "7.3"
  5. - "7.2"
  6. - "7.1"
  7. - "7.0"
  8. - "5.6"
  9. env:
  10. - DOKUWIKI=master
  11. - DOKUWIKI=stable
  12. - DOKUWIKI=old-stable
  13. before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
  14. install: sh travis.sh
  15. script: cd _test && ./phpunit.phar --stderr --group plugin_something

As you can see, you can specify the PHP versions and DokuWiki releases your plugin
should be tested against.

Plugins with dependencies

If your tests require additional plugins to be installed, provide a requirements.txt
file in your plugin’s root directory. It should contain arguments to the git clone command,
eg. the source repository and the target directory. The latter needs to be a full path
in the DokuWiki hierarchy.

Here’s an example requirements.txt file:

  1. # additional requirements for this plugin:
  2. https://github.com/cosmocode/sqlite.git lib/plugins/sqlite
  3. https://github.com/splitbrain/dokuwiki-plugin-translation.git lib/plugins/translation

If your plugin needs any additional setup before testing you need to provide your own
script to be run in the before_script step of .travis.yml. Refer to the travis
docs on how to do that.

More info

More info on Unit Testing in DokuWiki is available at https://www.dokuwiki.org/devel:unittesting