Skip to content

Commit 60cc0c7

Browse files
feat: Enhance environment configuration and testing setup with new .env variables and Codeception adjustments. (#124)
1 parent 05e834c commit 60cc0c7

File tree

16 files changed

+622
-44
lines changed

16 files changed

+622
-44
lines changed

.env

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# User and Group settings
2-
# For automatic host user detection, run before docker-compose:
3-
# export USER_ID=$(id -u) && export GROUP_ID=$(id -g)
4-
# Otherwise, these defaults will be used:
1+
# === SYSTEM CONFIGURATION ===
52
USER_ID=1000
63
GROUP_ID=1000
74
USER_NAME=www-data
85
GROUP_NAME=www-data
96

10-
# Yii2 environment settings
7+
# === YII2 APPLICATION ===
118
YII_DEBUG=true
129
YII_ENV=dev

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ jobs:
2424
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
2525
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2626
with:
27+
codeception-command: vendor/bin/codecept run --env php-builtin --coverage-xml
2728
coverage-file: runtime/output/coverage.xml
28-
extensions: gd, intl
29+
extensions: gd, intl, pcov

.github/workflows/docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: docker exec yii2-apache vendor/bin/codecept build
4040

4141
- name: Run codeception tests.
42-
run: docker exec yii2-apache vendor/bin/codecept run
42+
run: docker exec yii2-apache vendor/bin/codecept run --env dockerized
4343

4444
test-caddy:
4545
runs-on: ubuntu-latest
@@ -67,7 +67,7 @@ jobs:
6767
run: docker exec yii2-caddy vendor/bin/codecept build
6868

6969
- name: Run codeception tests.
70-
run: docker exec yii2-caddy vendor/bin/codecept run
70+
run: docker exec yii2-caddy vendor/bin/codecept run --env dockerized
7171

7272
test-frankenphp:
7373
runs-on: ubuntu-latest
@@ -95,7 +95,7 @@ jobs:
9595
run: docker exec yii2-frankenphp vendor/bin/codecept build
9696

9797
- name: Run codeception tests.
98-
run: docker exec yii2-frankenphp vendor/bin/codecept run
98+
run: docker exec yii2-frankenphp vendor/bin/codecept run --env dockerized
9999

100100
test-nginx:
101101
runs-on: ubuntu-latest
@@ -123,4 +123,4 @@ jobs:
123123
run: docker exec yii2-nginx vendor/bin/codecept build
124124

125125
- name: Run codeception tests.
126-
run: docker exec yii2-nginx vendor/bin/codecept run
126+
run: docker exec yii2-nginx vendor/bin/codecept run --env dockerized

codeception.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ bootstrap: _bootstrap.php
33
support_namespace: Support
44
paths:
55
tests: tests
6-
output: public/runtime/output
6+
output: runtime/output
77
data: tests/Support/data
88
support: tests/Support
9-
envs: public/runtime/_envs
9+
envs: tests/_envs
1010
actor_suffix: Tester
1111
settings:
1212
memory_limit: 1024M

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"ui-awesome/html": "^0.3",
1616
"ui-awesome/html-component-bootstrap5": "^1.0@dev",
1717
"ui-awesome/html-svg":"^0.2",
18+
"vlucas/phpdotenv": "^5.6",
1819
"yii2-extensions/localeurls": "^0.1.0",
1920
"yiisoft/yii2": "^2.0.53|^22",
2021
"yiisoft/yii2-bootstrap5": "^2.0.50|^22",
@@ -26,6 +27,7 @@
2627
"codeception/lib-innerbrowser": "^4.0",
2728
"codeception/module-asserts": "^3.0",
2829
"codeception/module-filesystem": "^3.0",
30+
"codeception/module-phpbrowser": "^3.0",
2931
"codeception/module-yii2": "^1.1",
3032
"codeception/verify": "^3.0",
3133
"maglnet/composer-require-checker": "^4.6",
@@ -75,6 +77,6 @@
7577
"ecs": "./vendor/bin/ecs --fix",
7678
"rector": "./vendor/bin/rector process src",
7779
"static": "./vendor/bin/phpstan analyse src --memory-limit=512M",
78-
"tests": "./vendor/bin/codecept run"
80+
"tests": "./vendor/bin/codecept run --env php-builtin"
7981
}
8082
}

0 commit comments

Comments
 (0)