xref: /plugin/socialcards/.github/workflows/CI.yml (revision 7e4aad61c3058f8691fb1f53753e6e398739a165)
1name: CI
2
3on: [ push, pull_request, workflow_dispatch ]
4
5jobs:
6  testLinux:
7    name: PHP Unit
8    runs-on: ubuntu-latest
9
10    strategy:
11      matrix:
12        php-version: [ '8.0', '8.1', '8.2' ]
13        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
43
44      - name: Run PHPUnit
45        run: |
46          cd _test && PRESERVE_TMP=false ./phpunit.phar --stderr --verbose --debug --group plugin_socialcards
47