forked from yiisoft/db-mssql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scrutinizer.yml
68 lines (58 loc) · 2.22 KB
/
.scrutinizer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
checks:
php: true
filter:
paths:
- src/
build:
image: default-bionic
environment:
php:
version: 8.1.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
dependencies:
override:
- 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 install apt-transport-https ca-certificates -y
- sudo apt-get install make -y
- sudo apt-get update -y
- sudo apt-get install unixodbc-dev=2.3.7 unixodbc=2.3.7 odbcinst1debian2=2.3.7 odbcinst=2.3.7 -y
- sudo ACCEPT_EULA=Y apt-get install mssql-tools -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 channel-update pecl.php.net
- pecl install pdo_sqlsrv
- composer config preferred-install.yiisoft/db source
- composer update --no-interaction --no-progress --optimize-autoloader --ansi
tests:
override:
- command: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
on_node: 1
coverage:
file: coverage.xml
format: php-clover