Skip to content

Commit bb1cea8

Browse files
Fix scrutinizer-ci. (#109)
1 parent 801245e commit bb1cea8

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

.scrutinizer.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,35 @@ filter:
66
- "src/*"
77

88
build:
9+
image: default-bionic
10+
11+
environment:
12+
variables:
13+
YII_ENV: test
14+
15+
php:
16+
version: 8.0.11
17+
ini:
18+
xdebug.mode: coverage
19+
920
nodes:
1021
analysis:
11-
environment:
12-
php: 8.0.6
13-
1422
tests:
1523
override:
1624
- php-scrutinizer-run
1725

18-
tests-and-coverage:
19-
environment:
20-
php:
21-
version: 8.0.6
22-
ini:
23-
xdebug.mode: coverage
24-
26+
codeception:
2527
dependencies:
2628
override:
2729
- composer self-update
2830
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
2931

3032
tests:
3133
override:
32-
- command: php -S 127.0.0.1:8080 -t public public/index-test.php > ./runtime/yii.log 2>&1 & vendor/bin/codecept run acceptance --coverage-xml --env github-ci
34+
- command: |
35+
./yii serve 127.0.0.1:8080 > ./runtime/yii.log 2>&1 &
36+
vendor/bin/codecept run acceptance --coverage-xml --env github-ci
3337
on_node: 1
3438
coverage:
35-
file: tests/_output/coverage.xml
39+
file: runtime/tests/_output/coverage.xml
3640
format: php-clover

codeception.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
namespace: App\Tests
22
paths:
33
tests: tests
4-
output: tests/_output
5-
data: tests/_data
4+
output: runtime/tests/_output
5+
data: runtime/tests/_data
66
support: tests/_support
77
envs: tests/_envs
88
actor_suffix: Tester

public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
require_once dirname(__DIR__) . '/preload.php';
2929

30-
if ($_ENV['YII_ENV'] === 'test') {
30+
if (getenv('YII_ENV') === 'test') {
3131
$c3 = dirname(__DIR__) . '/c3.php';
3232
if (file_exists($c3)) {
3333
require_once $c3;

0 commit comments

Comments
 (0)