-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.scrutinizer.yml
148 lines (126 loc) · 6.05 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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
db-mysql:
image: mysql:8.0.29
# Define any additional environment variables that are needed by the service.
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_ROOT_PASSWORD: ''
MYSQL_DATABASE: yiitest
# 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
- 3306
# 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
db-pgsql:
image: postgres:14
# Define any additional environment variables that are needed by the service.
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: yiitest
# 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
- 5432
# 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
db-oracle:
image: gvenzl/oracle-xe:21
# 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
- 1521
env:
ORACLE_DATABASE : yiitest
ORACLE_PASSWORD : root
# 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
- sudo mkdir -p /opt/oracle
- sudo curl -k -L --output /opt/oracle/instantclient-basic-linux.x64-21.3.0.0.0.zip https://download.oracle.com/otn_software/linux/instantclient/213000/instantclient-basic-linux.x64-21.3.0.0.0.zip
- sudo curl -k -L --output /opt/oracle/instantclient-sdk-linux.x64-21.3.0.0.0.zip https://download.oracle.com/otn_software/linux/instantclient/213000/instantclient-sdk-linux.x64-21.3.0.0.0.zip
- sudo unzip /opt/oracle/instantclient-basic-linux.x64-21.3.0.0.0.zip -d /opt/oracle
- sudo unzip /opt/oracle/instantclient-sdk-linux.x64-21.3.0.0.0.zip -d /opt/oracle
- sudo apt-get install libaio1 -y
- export ORACLE_HOME=/opt/oracle/instantclient_21_3
- sudo sh -c "echo /opt/oracle/instantclient_21_3 > /etc/ld.so.conf.d/oracle-instantclient.conf"
- sudo ldconfig
- sh -c "echo 'instantclient,/opt/oracle/instantclient_21_3' | pecl install oci8-3.0.1"
- sudo ldconfig
- curl -k -L --output /home/scrutinizer/php-8.1.18.tar.gz https://www.php.net/distributions/php-8.1.18.tar.gz
- cd /home/scrutinizer
- tar -zxf php-8.1.18.tar.gz
- cd php-8.1.18/ext/pdo_oci
- phpize
- ./configure --with-pdo-oci=instantclient,/opt/oracle/instantclient_21_3
- make
- sudo make install
- sudo ldconfig
- cd /home/scrutinizer/build/
- composer require yiisoft/db-mssql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- composer require yiisoft/db-mysql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- composer require yiisoft/db-oracle --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- composer require yiisoft/db-pgsql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- composer require yiisoft/db-sqlite --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- echo 'extension=pdo_oci' >> /home/scrutinizer/.phpenv/versions/8.1.18/etc/php.ini
override:
- command: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
coverage:
file: coverage.xml
format: php-clover