Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Sep 20, 2024
1 parent 89da7a3 commit 4645385
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: build

jobs:
tests:
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql.server }}
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}

env:
COMPOSER_ROOT_VERSION: 1.0.0
Expand All @@ -35,37 +35,31 @@ jobs:
- 8.2
- 8.3

mssql:
- server: 2022-latest
odbc-version: 18
flag: "-C"
mssql: 2022-latest

include:
- php: 8.3
mssql: { server: 2017-latest }
mssql: 2017-latest
- php: 8.3
mssql:
server: 2019-latest
odbc-version: 18
flag: "-C"
mssql: 2019-latest

services:
mssql:
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql.server }}
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql }}
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
options: --name=mssql --health-cmd="/opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
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: Checkout.
uses: actions/checkout@v3

- name: Create MS SQL Database.
run: docker exec -i mssql /opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand Down

0 comments on commit 4645385

Please sign in to comment.