1name: Linux Unit Tests 2 3on: 4 push: 5 branches-ignore: 6 - stable 7 - old-stable 8 pull_request: 9 10jobs: 11 run: 12 name: PHP ${{ matrix.php-versions }} 13 runs-on: ubuntu-latest 14 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 15 16 strategy: 17 matrix: 18 php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] 19 fail-fast: false 20 21 services: 22 mysql: 23 image: mysql:5.7 24 env: 25 MYSQL_ALLOW_EMPTY_PASSWORD: yes 26 ports: 27 - 3306:3306 28 postgres: 29 image: postgres:latest 30 env: 31 POSTGRES_PASSWORD: postgres 32 ports: 33 - 5432:5432 34 steps: 35 - name: Checkout 36 uses: actions/checkout@v2 37 38 - name: Setup PHP 39 uses: shivammathur/setup-php@v2 40 with: 41 php-version: ${{ matrix.php-versions }} 42 extensions: mbstring, intl, PDO, pdo_sqlite, pdo_mysql, pdo_pgsql, bz2 43 ini-values: pcre.jit=0 44 45 - name: Setup problem matchers 46 run: | 47 echo ::add-matcher::${{ runner.tool_cache }}/php.json 48 echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json 49 50 - name: Setup PHPUnit 51 run: | 52 php _test/fetchphpunit.php 53 cd _test 54 cp mysql.conf.php.dist mysql.conf.php 55 cp pgsql.conf.php.dist pgsql.conf.php 56 57 - name: Run PHPUnit 58 run: | 59 cd _test 60 php phpunit.phar --verbose --stderr 61