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