Skip to content

Commit

Permalink
Fix MSSQL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 12, 2024
1 parent 3dde794 commit 17e140c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/db-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

env:
COMPOSER_ROOT_VERSION: dev-master
extensions: pdo, pdo_sqlsrv-5.10.1
extensions: pdo, pdo_sqlsrv-5.12
key: cache-v1

runs-on: ubuntu-latest
Expand All @@ -52,6 +52,11 @@ jobs:
options: --name=mssql --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -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 curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
- name: Checkout.
uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion tests/Support/MssqlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final class MssqlHelper extends ConnectionHelper
{
private string $dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest';
private string $dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no';
private string $username = 'SA';
private string $password = 'YourStrong!Passw0rd';
private string $charset = 'UTF8';
Expand Down

0 comments on commit 17e140c

Please sign in to comment.