Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MSSQL versions in CI workflow. #20240

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions .github/workflows/ci-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

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

env:
EXTENSIONS: pdo, pdo_sqlsrv
Expand All @@ -21,37 +21,45 @@ jobs:
strategy:
fail-fast: false
matrix:
php:
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4

mssql:
- version: server:2022-latest
mssql-tool: /opt/mssql-tools18/bin/sqlcmd -C

include:
- php: 7.4
mssql: server:2017-latest
mssql:
version: server:2017-latest
mssql-tool: /opt/mssql-tools/bin/sqlcmd
- php: 8.0
mssql: server:2019-latest
- php: 8.1
mssql: server:2019-latest
- php: 8.2
mssql: server:2022-latest
- php: 8.3
mssql: server:2022-latest
- php: 8.4
mssql: server:2022-latest
mssql:
version: server:2019-latest
mssql-tool: /opt/mssql-tools18/bin/sqlcmd -C

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

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

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