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