Skip to content

Commit

Permalink
Merge pull request #28 from mizunashi-mana/support-coverage
Browse files Browse the repository at this point in the history
Support coverage
  • Loading branch information
mizunashi-mana committed Nov 3, 2018
2 parents 8046628 + 2758600 commit 405b98a
Show file tree
Hide file tree
Showing 19 changed files with 474 additions and 256 deletions.
13 changes: 12 additions & 1 deletion .circleci/config.yml
Expand Up @@ -46,7 +46,18 @@ jobs:

- run: ./bin/php-cs-fixer fix --dry-run

- run: composer test
- run: |
curl -o cc-test-reporter -sSL https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
chmod +x ./cc-test-reporter
- run: |
sudo docker-php-ext-enable xdebug
- run: |
./cc-test-reporter before-build
composer test -- --coverage-clover clover.xml
./cc-test-reporter after-build --exit-code $? \
--coverage-input-type clover
docker-test:
machine: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
*.tar.gz
/coverage/

# for DokuWiki
/manager.dat
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -12,7 +12,7 @@ Read the section for your purpose.

1. `composer install --prefer-source --dev`
2. `./bin/php-cs-fixer fix`
3. `composer test`
3. `composer test` and fix any failing tests
4. `git commit` with message
5. Open a pull request and fix any failing tests

Expand Down
15 changes: 15 additions & 0 deletions Makefile
@@ -1,6 +1,21 @@
.PHONY: build
build:
composer install \
--no-interaction \
--optimize-autoloader \
--no-dev --no-scripts --no-suggest
./scripts/archive.bash

.PHONY: setup-dev
setup-dev:
composer install --prefer-source

.PHONY: test
test:
composer test

.PHONY: coverage
coverage:
composer test -- \
--coverage-clover coverage/clover.xml \
--coverage-html coverage/html
10 changes: 6 additions & 4 deletions README.md
@@ -1,17 +1,19 @@
# Markdown plugin for DokuWiki

[![CircleCI](https://circleci.com/gh/mizunashi-mana/dokuwiki-plugin-mdpage/tree/master.svg?style=svg)](https://circleci.com/gh/mizunashi-mana/dokuwiki-plugin-mdpage/tree/master)
[![Maintainability](https://api.codeclimate.com/v1/badges/b43a73f03fca36f12742/maintainability)](https://codeclimate.com/github/mizunashi-mana/dokuwiki-plugin-mdpage/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/b43a73f03fca36f12742/test_coverage)](https://codeclimate.com/github/mizunashi-mana/dokuwiki-plugin-mdpage/test_coverage)

## Installation / Usage

See https://www.dokuwiki.org/plugin:mdpage
See <https://www.dokuwiki.org/plugin:mdpage>.

## Contributing Guide
## Report a bug / Contribute a fix

See [Contributing Guide](CONTRIBUTING.md).

## License

This plugin is licensed under the MIT License; see [LICENSE File](LICENSE).
This plugin is licensed under [the MIT License](LICENSE).

* Using [cebe/markdown](https://github.com/cebe/markdown) to parse Markdown texts.
* Using [cebe/markdown](https://github.com/cebe/markdown) to parse Markdown texts under [the MIT License](https://github.com/cebe/markdown/blob/master/LICENSE).
8 changes: 5 additions & 3 deletions assets/sample-page.txt
@@ -1,18 +1,20 @@
<markdown>
# Header

<!-- comment -->

simple paragraph: *emph*, **strong** and `mono`.

<html>
<p>inline html</p>
</html>
<p>inline html s</p>

> quote

```
code block
```

----

[link](https://www.dokuwiki.org)

![image](https://secure.php.net/images/php.gif)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
@@ -1,5 +1,5 @@
{
"name": "mizunashi/dokuwiki-plugin-mdpage",
"name": "mizunashi-mana/dokuwiki-plugin-mdpage",
"type": "dokuwiki-plugin",
"description": "DokuWiki Markdown Plugin",
"keywords": [
Expand All @@ -25,7 +25,7 @@
"cebe/markdown": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7",
"phpunit/phpunit": "^6.5 || ^7.2",
"splitbrain/dokuwiki": "dev-stable#release_stable_2018-04-22a",
"friendsofphp/php-cs-fixer": "^2.13",
"metasyntactical/composer-plugin-license-check": "^0.3.0"
Expand Down

0 comments on commit 405b98a

Please sign in to comment.