xref: /plugin/backlinks/.github/workflows/CI.yml (revision 5456002411edc4a86c6ad821ec4ed447b506ab5d)
1name: CI
2
3on: [push, pull_request]
4
5jobs:
6    testLinux:
7        name: PHP Unit
8        runs-on: ubuntu-latest
9
10        strategy:
11            matrix:
12                php-version: ['7.4']
13                dokuwiki-branch: [ 'master', 'stable']
14                include:
15                  - php-version: '8.0'
16                    dokuwiki-branch: 'master'
17                  - php-version: '8.1'
18                    dokuwiki-branch: 'master'
19            fail-fast: false
20
21        steps:
22            - uses: actions/checkout@v3
23
24            - name: Setup PHP
25              uses: shivammathur/setup-php@v2
26              with:
27                  php-version: ${{ matrix.php-version }}
28                  extensions: mbstring, intl, bz2
29
30            - name: Setup problem matchers
31              run: |
32                echo ::add-matcher::${{ runner.tool_cache }}/php.json
33                echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
34
35            - name: Download DokuWiki Test-setup
36              run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
37
38            - name: Install DokuWiki
39              env:
40                  CI_SERVER: 1
41                  DOKUWIKI: ${{ matrix.dokuwiki-branch }}
42              run: sh travis.sh
43
44            - name: Setup PHPUnit
45              run: |
46                  php _test/fetchphpunit.php
47                  ./_test/phpunit.phar --version
48
49            - name: Run PHPUnit
50              run: |
51                cd _test && PRESERVE_TMP=false ./phpunit.phar --stderr --verbose --debug --group plugin_backlinks
52