-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.scrutinizer.yml
More file actions
119 lines (118 loc) · 5.04 KB
/
.scrutinizer.yml
File metadata and controls
119 lines (118 loc) · 5.04 KB
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
checks:
php:
code_rating: true
duplication: true
build:
image: default-jammy
environment:
php: 8.4.11
nodes:
coverage:
services:
mariadb:
image: docker.io/library/mariadb:10.6.12
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
ports:
- 3306
ramdisks:
- /var/run/mysqld
postgres: 10
dependencies:
before:
- printf "\n" | pecl install xdebug-3.4.7
- mysql -u root -e "CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- PGPASSWORD=scrutinizer psql -h 127.0.0.1 -U scrutinizer -d scrutinizer -tc "SELECT 1 FROM pg_database WHERE datname = 'divergence'" | grep -q 1 || PGPASSWORD=scrutinizer createdb -h 127.0.0.1 -U scrutinizer divergence
- PGPASSWORD=scrutinizer psql -h 127.0.0.1 -U scrutinizer -d scrutinizer -tc "SELECT 1 FROM pg_database WHERE datname = 'test'" | grep -q 1 || PGPASSWORD=scrutinizer createdb -h 127.0.0.1 -U scrutinizer test
- |
cat > config/db.dev.php <<'PHP'
<?php
return [
'mysql' => [
'host' => '127.0.0.1',
'database' => 'divergence',
'username' => 'divergence',
'password' => 'not-a-secret',
],
'dev-mysql' => [
'host' => '127.0.0.1',
'database' => 'divergence',
'username' => 'divergence',
'password' => 'not-a-secret',
],
'tests-mysql' => [
'host' => '127.0.0.1',
'database' => 'test',
'username' => 'root',
'password' => '',
],
'tests-mysql-socket' => [
'socket' => '/var/run/mysqld/mysqld.sock',
'database' => 'test',
'username' => 'root',
'password' => '',
],
'pgsql' => [
'driver' => 'pgsql',
'host' => '127.0.0.1',
'port' => 5432,
'database' => 'divergence',
'username' => 'scrutinizer',
'password' => 'scrutinizer',
],
'dev-pgsql' => [
'driver' => 'pgsql',
'host' => '127.0.0.1',
'port' => 5432,
'database' => 'divergence',
'username' => 'scrutinizer',
'password' => 'scrutinizer',
],
'tests-sqlite-memory' => [
'path' => ':memory:',
'foreign_keys' => true,
'busy_timeout' => 5000,
],
'sqlite' => [
'path' => __DIR__ . '/../var/sqlite/app.sqlite',
'foreign_keys' => true,
'busy_timeout' => 5000,
],
'dev-sqlite' => [
'path' => __DIR__ . '/../var/sqlite/dev.sqlite',
'foreign_keys' => true,
'busy_timeout' => 5000,
],
'tests-sqlite-files' => [
'path' => __DIR__ . '/../var/sqlite/tests.sqlite',
'foreign_keys' => true,
'busy_timeout' => 5000,
],
'tests-pgsql' => [
'driver' => 'pgsql',
'host' => '127.0.0.1',
'port' => 5432,
'database' => 'test',
'username' => 'scrutinizer',
'password' => 'scrutinizer',
],
];
PHP
- sudo apt install -y ffmpeg exiftool
tests:
override:
- command: mkdir -p build/coverage build/logs && DIVERGENCE_TEST_DB=tests-mysql XDEBUG_MODE=coverage php -d zend_extension=$(php-config --extension-dir)/xdebug.so -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-php build/coverage/mysql.cov
idle_timeout: 300
- command: mkdir -p build/coverage build/logs && DIVERGENCE_TEST_DB=tests-sqlite-memory XDEBUG_MODE=coverage php -d zend_extension=$(php-config --extension-dir)/xdebug.so -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-php build/coverage/sqlite.cov
idle_timeout: 300
- command: mkdir -p build/coverage build/logs && DIVERGENCE_TEST_DB=tests-pgsql XDEBUG_MODE=coverage php -d zend_extension=$(php-config --extension-dir)/xdebug.so -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-php build/coverage/pgsql.cov
idle_timeout: 300
- command: vendor/bin/phpcov merge --clover build/logs/clover.xml build/coverage
idle_timeout: 300
coverage:
file: 'build/logs/clover.xml'
format: 'php-clover'
analysis:
tests:
override:
- php-scrutinizer-run