xref: /plugin/openlayersmap/.github/workflows/CI.yml (revision 1e7188695dded3574610ebf5d61d06b8445bc961)
1name: CI
2
3on: [ push, pull_request, workflow_dispatch ]
4
5permissions:
6  contents: read
7
8jobs:
9  test:
10    name: PHP Unit
11    runs-on: ubuntu-latest
12
13    strategy:
14      matrix:
15        php-version: [ '8.0', '8.1', '8.2' ]
16        dokuwiki-branch: [ 'master', 'stable' ]
17      fail-fast: false
18
19    steps:
20      - uses: actions/checkout@v4
21
22      - name: Setup PHP
23        uses: shivammathur/setup-php@v2
24        with:
25          php-version: ${{ matrix.php-version }}
26          extensions: mbstring, intl, bz2, gd, imagick
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 and required plugins
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_openlayersmap
50