Checkout Config
checks:
php: true
filter:
paths:
- src/
build:
image: default-bionic
environment:
php:
version: 8.0.18
ini:
xdebug.mode: coverage
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
phpunit:
services:
db-mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
# Define any additional environment variables that are needed by the service.
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
MSSQL_PID: Developer
# We automatically forward these ports from your localhost to the service's port.
# Alternatively, you can also access the service on the "$SERVICE_SOME_NAME_IP"
# environment variable.
ports:
# Forward 127.0.0.1:12345 -> SERVICE_IP:12345
- 1433
# If your service writes data to disk like most databases do, you can significantly
# speed up tests by mounting a ramdisk at those paths.
ramdisks:
- /var/lib/data
tests:
before:
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
- sudo apt-get update -y
- sudo ACCEPT_EULA=Y apt-get install mssql-tools unixodbc-dev -y
- sudo ls /opt/mssql-tools/bin/sqlcmd*
- /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
- pecl -q install pdo_sqlsrv
override:
- command: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
on_node: 1
coverage:
file: coverage.xml
format: php-clover