From 3cd8f191d617c270cc969026c91f5084db3f7369 Mon Sep 17 00:00:00 2001 From: Viktor Khokhryakov Date: Wed, 11 Dec 2024 15:23:12 +0400 Subject: [PATCH] Prepare `MSSQL` workflow for `ubuntu-24.04` runner image (#20298) --- .github/workflows/ci-mssql.yml | 6 +++++- tests/data/config.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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',