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