Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/splitbrain/dokuwiki-travis

Environment setup script for testing DokuWiki plugins on travis-ci
https://github.com/splitbrain/dokuwiki-travis

dokuwiki travis-ci unit-testing

Last synced: 20 days ago
JSON representation

Environment setup script for testing DokuWiki plugins on travis-ci

Awesome Lists containing this project

README

        

Travis CI testing for DokuWiki plugins
======================================

This repository contains a script that can be used in
[Travis CI](https://travis-ci.org) or [Gitlab-CI](https://about.gitlab.com/gitlab-ci/)
to setup the DokuWiki environment to test a single plugin.

Setup
-----

Use it like this in ``.travis.yml``:

```
language: php
php:
- "7.4"
- "7.3"
- "7.2"
- "7.1"
- "7.0"
- "5.6"
env:
- DOKUWIKI=master
- DOKUWIKI=stable
- DOKUWIKI=old-stable
before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
install: sh travis.sh
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:

```
# additional requirements for this plugin:
https://github.com/cosmocode/sqlite.git lib/plugins/sqlite
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