diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 08ce49057bb..d9af9335aa8 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -16,7 +16,7 @@ jobs: EXTENSIONS: pdo, pdo_sqlsrv XDEBUG_MODE: coverage, develop - runs-on: ubuntu-latest + runs-on: ${{ matrix.mssql.os || 'ubuntu-latest' }} strategy: fail-fast: false @@ -38,6 +38,7 @@ jobs: mssql: version: server:2017-latest mssql-tool: /opt/mssql-tools/bin/sqlcmd + os: ubuntu-22.04 - php: 8.0 mssql: version: server:2019-latest @@ -55,6 +56,9 @@ jobs: options: --name=mssql --health-cmd="${{ matrix.mssql.mssql-tool }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: + - name: Install ODBC driver + run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 + - name: Checkout uses: actions/checkout@v4 diff --git a/tests/data/config.php b/tests/data/config.php index eb73f340d25..f40a54dc343 100644 --- a/tests/data/config.php +++ b/tests/data/config.php @@ -37,7 +37,7 @@ 'fixture' => __DIR__ . '/sqlite.sql', ], 'sqlsrv' => [ - 'dsn' => 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest', + 'dsn' => 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no', 'username' => 'SA', 'password' => 'YourStrong!Passw0rd', 'fixture' => __DIR__ . '/mssql.sql',