Skip to content

Commit

Permalink
Update PHP and MSSQL versions in CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Aug 2, 2024
1 parent 9fc8a2d commit 39e4b15
Showing 1 changed file with 22 additions and 14 deletions.
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

0 comments on commit 39e4b15

Please sign in to comment.