Skip to content

Add a test case when an exception is expected when setting a private field #922

Add a test case when an exception is expected when setting a private field

Add a test case when an exception is expected when setting a private field #922

Workflow file for this run

on:
push:
branches:
- '2.*'
pull_request: null
name: ci-mssql
jobs:
tests:
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
env:
key: cache
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.0'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2017-latest'
- php: '8.0'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-CU25-ubuntu-20.04'
- php: '8.1'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-CU25-ubuntu-20.04'
- php: '8.2'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-CU25-ubuntu-20.04'
- php: '8.3'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-CU25-ubuntu-20.04'
services:
mssql:
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
env:
SA_PASSWORD: SSpaSS__1
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 11433:1433
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: date.timezone='UTC'
tools: composer:v2, pecl
- name: Determine composer cache directory on Linux
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update
- name: Install dependencies with composer
if: matrix.php != '8.4'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Install dependencies with composer php 8.4
if: matrix.php == '8.4'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run tests with phpunit without coverage
env:
DB: sqlserver
run: vendor/bin/phpunit --group driver-sqlserver --colors=always