diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index ed5ee82b8878..1521be12d8c6 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -42,6 +42,13 @@ jobs: matrix: php-versions: ['7.3', '7.4', '8.0'] db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV'] + include: + - php-versions: '7.3' + mssql: 'server:2017-latest' + - php-versions: '7.4' + mssql: 'server:2017-latest' + - php-versions: '8.0' + mssql: 'server:2019-latest' services: mysql: @@ -62,13 +69,14 @@ jobs: - 5432:5432 options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 mssql: - image: mcr.microsoft.com/mssql/server:2017-latest + image: mcr.microsoft.com/mssql/${{ matrix.mssql }} env: SA_PASSWORD: 1Secure*Password1 ACCEPT_EULA: Y MSSQL_PID: Developer ports: - 1433:1433 + options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1,1433 -U SA -P '1Secure*Password1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 redis: image: redis ports: @@ -82,7 +90,7 @@ jobs: steps: - name: Create database for MSSQL Server if: matrix.db-platforms == 'SQLSRV' - run: sqlcmd -S 127.0.0.1,1433 -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test" + run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1,1433 -U SA -P '1Secure*Password1' -Q 'CREATE DATABASE test' - name: Checkout uses: actions/checkout@v2