Skip to content

Commit ece4843

Browse files
authored
Merge pull request #30 from mprins/CI-fixes
Update CI workflow
2 parents 7fd770d + f985d83 commit ece4843

File tree

2 files changed

+12
-41
lines changed

2 files changed

+12
-41
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,16 @@
1-
name: CI
1+
name: 'CI'
22

3-
on: [ push, pull_request ]
3+
on: [ push, pull_request, workflow_dispatch ]
44

55
jobs:
6-
testLinux:
7-
name: PHP Unit
8-
runs-on: ubuntu-latest
9-
6+
action:
107
strategy:
8+
fail-fast: false
119
matrix:
12-
php-version: [ '8.0', '8.1', '8.2' ]
10+
php-version: [ '8.1', '8.2', '8.3' ]
1311
dokuwiki-branch: [ 'master', 'stable' ]
14-
fail-fast: false
15-
16-
steps:
17-
- uses: actions/checkout@v4
18-
19-
- name: Setup PHP
20-
uses: shivammathur/setup-php@v2
21-
with:
22-
php-version: ${{ matrix.php-version }}
23-
extensions: mbstring, intl, bz2
24-
25-
- name: Setup problem matchers
26-
run: |
27-
echo ::add-matcher::${{ runner.tool_cache }}/php.json
28-
echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
29-
30-
- name: Download DokuWiki Test-setup
31-
run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
32-
33-
- name: Install DokuWiki
34-
env:
35-
CI_SERVER: 1
36-
DOKUWIKI: ${{ matrix.dokuwiki-branch }}
37-
run: sh travis.sh
38-
39-
- name: Setup PHPUnit
40-
run: |
41-
php _test/fetchphpunit.php
42-
./_test/phpunit.phar --version
4312

44-
- name: Run PHPUnit
45-
run: |
46-
cd _test && PRESERVE_TMP=false ./phpunit.phar --stderr --verbose --debug --group plugin_pagequery
13+
uses: mprins/.github/.github/workflows/test.yml@main
14+
with:
15+
php-version: ${{ matrix.php-version }}
16+
dokuwiki-branch: ${{ matrix.dokuwiki-branch }}

syntax.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ public function render($format, Doku_Renderer $renderer, $data): bool
240240
$group_opts = [];
241241
$message = '';
242242

243-
$lang = ['jump_section' => $this->getLang('jump_section'), 'link_to_top' => $this->getLang('link_to_top'), 'no_results' => $this->getLang('no_results')];
243+
$lang = ['jump_section' => $this->getLang('jump_section'), 'link_to_top' => $this->getLang('link_to_top'),
244+
'no_results' => $this->getLang('no_results')];
244245
require_once DOKU_PLUGIN . 'pagequery/PageQuery.php';
245246
$pq = new PageQuery($lang);
246247

@@ -267,13 +268,13 @@ public function render($format, Doku_Renderer $renderer, $data): bool
267268
// search by page name or path only
268269
$results = $pq->pageLookup($query, $data['fullregex'], $incl_ns, $excl_ns);
269270
}
270-
$results = $pq->validatePages($results, $data['hidestart'], $data['maxns']);
271271
$no_result = false;
272272
$sort_array = [];
273273
if ($results == false) {
274274
$no_result = true;
275275
$message = $this->getLang('regex_error');
276276
} elseif (!empty($results)) {
277+
$results = $pq->validatePages($results, $data['hidestart'], $data['maxns']);
277278
// prepare the necessary sorting arrays, as per users options
278279
[$sort_array, $sort_opts, $group_opts] = $pq->buildSortingArray($results, $data);
279280

0 commit comments

Comments
 (0)