name: PHPUnit
on:
  push:
    branches:
      - master
    tags:
      - v*.*.*
  pull_request:
    branches:
      - master

jobs:
  Build:
    runs-on: 'ubuntu-latest'
    container: 'byjg/php:${{ matrix.php-version }}-cli'
    strategy:
      matrix:
        php-version:
#          - "8.1"
#          - "8.0"
          - "7.4"
          - "7.3"
#          - "7.2"
#          - "7.1"
#          - "7.0"
#          - "5.6"

    steps:
      - uses: actions/checkout@v2
      - name: Spin up databases
        run: |
          apk add --no-cache python3 python3-dev py3-pip build-base libffi-dev
          pip3 install --upgrade pip
          pip3 install docker-compose
          apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community docker
          docker-compose up -d postgres mysql
      - run: composer install
      - run: ./vendor/bin/phpunit
      - run: ./vendor/bin/phpunit tests/SqliteDatabase*
      - run: ./wait-for-db.sh postgres && ./vendor/bin/phpunit tests/PostgresDatabase*
      - run: ./wait-for-db.sh mysql && ./vendor/bin/phpunit tests/MysqlDatabase*
#      - run: ./wait-for-db.sh mssql && ./vendor/bin/phpunit tests/SqlServer*

name: PHPUnit
on:
  push:
    branches:
      - master
    tags:
      - v*.*.*
  pull_request:
    branches:
      - master

jobs:
  Build:
    runs-on: 'ubuntu-latest'
    container: 'byjg/php:${{ matrix.php-version }}-cli'
    strategy:
      matrix:
        php-version:
#          - "8.1"
#          - "8.0"
          - "7.4"
          - "7.3"
#          - "7.2"
#          - "7.1"
#          - "7.0"
#          - "5.6"

    steps:
      - uses: actions/checkout@v2
      - name: Spin up databases
        run: |
          apk add --no-cache python3 python3-dev py3-pip build-base libffi-dev
          pip3 install --upgrade pip
          pip3 install docker-compose
          apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community docker
          docker-compose up -d postgres mysql
      - run: composer install
      - run: ./vendor/bin/phpunit
      - run: ./vendor/bin/phpunit tests/SqliteDatabase*
      - run: ./wait-for-db.sh mysql && ./vendor/bin/phpunit tests/MysqlDatabase*
      - run: ./wait-for-db.sh postgres && ./vendor/bin/phpunit tests/PostgresDatabase*
#      - run: ./wait-for-db.sh mssql && ./vendor/bin/phpunit tests/SqlServer*

Fix tests with PHPUnit 9 (+2)
Fix tests with PHPUnit 9 (+2)
