xref: /dokuwiki/.github/workflows/testWindows.yml (revision 64871a5996286ab4406e03cc539f6733dc4273be)
12cf7c325SAndreas Gohrname: Windows Unit Tests
22cf7c325SAndreas Gohr
3476584a3SAndreas Gohron:
4476584a3SAndreas Gohr  push:
5476584a3SAndreas Gohr    branches-ignore:
6476584a3SAndreas Gohr      - stable
7476584a3SAndreas Gohr      - old-stable
8476584a3SAndreas Gohr  pull_request:
92cf7c325SAndreas Gohr
10ae4ab31cSAlexpermissions:
11ae4ab31cSAlex  contents: read  #  to fetch code (actions/checkout)
12ae4ab31cSAlex
132cf7c325SAndreas Gohrjobs:
142cf7c325SAndreas Gohr    run:
152cf7c325SAndreas Gohr        name: PHP ${{ matrix.php-versions }}
162cf7c325SAndreas Gohr        runs-on: windows-latest
17bb6dfcb8SAndreas Gohr        if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
182cf7c325SAndreas Gohr
192cf7c325SAndreas Gohr        strategy:
202cf7c325SAndreas Gohr            matrix:
21*64871a59SAndreas Gohr                php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
222cf7c325SAndreas Gohr            fail-fast: false
232cf7c325SAndreas Gohr
242cf7c325SAndreas Gohr        steps:
252cf7c325SAndreas Gohr            - name: Checkout
264d2a0912SAndreas Gohr              uses: actions/checkout@v4
272cf7c325SAndreas Gohr
282cf7c325SAndreas Gohr            - name: Setup PHP
292cf7c325SAndreas Gohr              uses: shivammathur/setup-php@v2
302cf7c325SAndreas Gohr              with:
312cf7c325SAndreas Gohr                  php-version: ${{ matrix.php-versions }}
322cf7c325SAndreas Gohr                  extensions: mbstring, intl, bz2
332cf7c325SAndreas Gohr
342cf7c325SAndreas Gohr            - name: Setup problem matchers
352cf7c325SAndreas Gohr              run: |
362cf7c325SAndreas Gohr                  echo "::add-matcher::${{ runner.tool_cache }}/php.json"
372cf7c325SAndreas Gohr                  echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
382cf7c325SAndreas Gohr
392cf7c325SAndreas Gohr            - name: Setup PHPUnit
402cf7c325SAndreas Gohr              run: |
414de5c5e9SAndreas Gohr                  cd _test
424de5c5e9SAndreas Gohr                  composer install --no-interaction --no-progress --no-suggest --prefer-dist
432cf7c325SAndreas Gohr
442cf7c325SAndreas Gohr            - name: Run PHPUnit
452cf7c325SAndreas Gohr              run: |
462cf7c325SAndreas Gohr                cd _test
474de5c5e9SAndreas Gohr                composer run test
48