Skip to content

Commit ff03140

Browse files
committed
ci: align GitHub Actions with Phase 5.5 IntegrationV2 rules
- Split PHPUnit execution into Unit/Resolver and IntegrationV2 stages - Prevent Resolver tests from requiring live infrastructure - Explicitly provision MySQL schemas and Mongo collections in CI - Enforce no auto-creation behavior per Phase 5.5 blueprint
1 parent 20c25cd commit ff03140

File tree

1 file changed

+45
-7
lines changed

1 file changed

+45
-7
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,55 @@ jobs:
199199
- name: Install bc
200200
run: sudo apt-get install -y bc
201201

202-
- name: 🧪 Run PHPUnit with Coverage
203-
id: tests
202+
# - name: 🧪 Run PHPUnit with Coverage
203+
# id: tests
204+
# run: |
205+
# php -d pcov.enabled=1 \
206+
# -d pcov.directory=./src \
207+
# -d pcov.exclude="~(tests|vendor)~" \
208+
# vendor/bin/phpunit \
209+
# --configuration phpunit.xml.dist \
210+
# --coverage-clover coverage.xml \
211+
# --coverage-html coverage \
212+
# | tee phpunit.log
213+
214+
# ---------------------------------------------
215+
# 9-A) Run Resolver + Unit tests (NO IntegrationV2)
216+
# ---------------------------------------------
217+
- name: 🧪 Run Unit & Resolver Tests
204218
run: |
205-
php -d pcov.enabled=1 \
206-
-d pcov.directory=./src \
207-
-d pcov.exclude="~(tests|vendor)~" \
208-
vendor/bin/phpunit \
219+
vendor/bin/phpunit \
209220
--configuration phpunit.xml.dist \
221+
--testsuite unit,resolver \
222+
| tee phpunit-unit.log
223+
224+
# ---------------------------------------------
225+
# 9-B) Prepare IntegrationV2 Infrastructure
226+
# ---------------------------------------------
227+
- name: Init MySQL IntegrationV2 Schema
228+
run: |
229+
mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS security_guard_dev < tests/IntegrationV2/MySQL/schema.sql
230+
231+
- name: Init Mongo IntegrationV2 Collections
232+
run: |
233+
mongosh <<EOF
234+
use security_guard
235+
db.createCollection("sg_attempts")
236+
db.createCollection("sg_blocks")
237+
EOF
238+
239+
# ---------------------------------------------
240+
# 9-C) Run IntegrationV2 Tests ONLY
241+
# ---------------------------------------------
242+
- name: 🧪 Run IntegrationV2 Tests
243+
run: |
244+
vendor/bin/phpunit \
245+
--configuration phpunit.xml.dist \
246+
--testsuite integrationv2 \
210247
--coverage-clover coverage.xml \
211248
--coverage-html coverage \
212-
| tee phpunit.log
249+
| tee phpunit-integration.log
250+
213251
214252
- name: Extract Coverage % (Clover)
215253
id: coverage

0 commit comments

Comments
 (0)