Merge pull request #4104 from m-martin-78/xfhsupport
[dokuwiki.git] / .github / workflows / testLinux.yml
blob2595a86948108fe8d29fc3303690da991a717b59
1 name: Linux Unit Tests
3 on:
4   push:
5     branches-ignore:
6       - stable
7       - old-stable
8   pull_request:
10 permissions:
11   contents: read  #  to fetch code (actions/checkout)
13 jobs:
14     run:
15         name: PHP ${{ matrix.php-versions }}
16         runs-on: ubuntu-latest
17         if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
19         strategy:
20             matrix:
21                 php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
22             fail-fast: false
24         services:
25             mysql:
26                 image: mysql:5.7
27                 env:
28                     MYSQL_ALLOW_EMPTY_PASSWORD: yes
29                 ports:
30                     - 3306:3306
31             postgres:
32                 image: postgres:latest
33                 env:
34                     POSTGRES_PASSWORD: postgres
35                 ports:
36                     - 5432:5432
37             squid:
38               image: ubuntu/squid
39               ports:
40                     - 3128:3128
41         steps:
42             - name: Checkout
43               uses: actions/checkout@v3
45             - name: Setup PHP
46               uses: shivammathur/setup-php@v2
47               with:
48                   php-version: ${{ matrix.php-versions }}
49                   extensions: mbstring, intl, PDO, pdo_sqlite, pdo_mysql, pdo_pgsql, bz2
50                   ini-values: pcre.jit=0
52             - name: Setup problem matchers
53               run: |
54                 echo ::add-matcher::${{ runner.tool_cache }}/php.json
55                 echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
57             - name: Setup PHPUnit
58               run: |
59                   cd _test
60                   composer install --no-interaction --no-progress --no-suggest --prefer-dist
61                   cp mysql.conf.php.dist mysql.conf.php
62                   cp pgsql.conf.php.dist pgsql.conf.php
63                   cp proxy.conf.php.dist proxy.conf.php
65             - name: Run PHPUnit
66               run: |
67                 cd _test
68                 composer run test