xref: /dokuwiki/.github/workflows/testWindows.yml (revision 73f7d49d56cb2af118a97c05969f9551075113d1)
1name: Windows Unit Tests
2
3on:
4  push:
5    branches-ignore:
6      - stable
7      - old-stable
8  pull_request:
9
10permissions:
11  contents: read  #  to fetch code (actions/checkout)
12
13jobs:
14    run:
15        name: PHP ${{ matrix.php-versions }}
16        runs-on: windows-latest
17        if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
18
19        strategy:
20            matrix:
21                php-versions: ['7.4', '8.0', '8.1', '8.2']
22            fail-fast: false
23
24        steps:
25            - name: Checkout
26              uses: actions/checkout@v3
27
28            - name: Setup PHP
29              uses: shivammathur/setup-php@v2
30              with:
31                  php-version: ${{ matrix.php-versions }}
32                  extensions: mbstring, intl, bz2
33
34            - name: Setup problem matchers
35              run: |
36                  echo "::add-matcher::${{ runner.tool_cache }}/php.json"
37                  echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
38
39            - name: Setup PHPUnit
40              run: |
41                  cd _test
42                  composer install --no-interaction --no-progress --no-suggest --prefer-dist
43
44            - name: Run PHPUnit
45              run: |
46                cd _test
47                composer run test
48