Public Access
Merge pull request 'fix(ci): enforce PHPStan + PHPUnit in CI' (#135) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
This commit was merged in pull request #135.
This commit is contained in:
@@ -124,16 +124,16 @@ jobs:
|
|||||||
echo "### PHPCS" >> $GITHUB_STEP_SUMMARY
|
echo "### PHPCS" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "PSR-12 compliance: passed" >> $GITHUB_STEP_SUMMARY
|
echo "PSR-12 compliance: passed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: "PHPStan (Level 2)"
|
- name: "PHPStan (Level 6)"
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
run: |
|
||||||
vendor/bin/phpstan analyse -c phpstan.neon --no-progress --error-format=github 2>&1 || {
|
vendor/bin/phpstan analyse -c phpstan.neon --no-progress --memory-limit=512M --error-format=github 2>&1 || {
|
||||||
echo "::warning::PHPStan found type errors (advisory)"
|
echo "::error::PHPStan found type errors"
|
||||||
echo "### PHPStan" >> $GITHUB_STEP_SUMMARY
|
echo "### PHPStan" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Static analysis errors detected. Run \`composer phpstan\` locally." >> $GITHUB_STEP_SUMMARY
|
echo "Static analysis errors detected. Run \`composer phpstan\` locally." >> $GITHUB_STEP_SUMMARY
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
echo "### PHPStan" >> $GITHUB_STEP_SUMMARY
|
echo "### PHPStan" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Static analysis: advisory (level 0)" >> $GITHUB_STEP_SUMMARY
|
echo "Static analysis (level 6): passed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: "Psalm"
|
- name: "Psalm"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -177,11 +177,14 @@ jobs:
|
|||||||
|
|
||||||
- name: "PHPUnit (PHP ${{ matrix.php }})"
|
- name: "PHPUnit (PHP ${{ matrix.php }})"
|
||||||
run: |
|
run: |
|
||||||
vendor/bin/phpunit --testdox 2>&1
|
vendor/bin/phpunit --testdox 2>&1 || {
|
||||||
{
|
echo "::error::PHPUnit tests failed"
|
||||||
echo "### PHPUnit (PHP ${{ matrix.php }})"
|
echo "### PHPUnit (PHP ${{ matrix.php }})" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "All tests passed."
|
echo "Tests failed. Run \`vendor/bin/phpunit --testdox\` locally." >> $GITHUB_STEP_SUMMARY
|
||||||
} >> $GITHUB_STEP_SUMMARY
|
exit 1
|
||||||
|
}
|
||||||
|
echo "### PHPUnit (PHP ${{ matrix.php }})" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "All tests passed." >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════
|
||||||
# Gate 3 — Self-Health (Dogfood)
|
# Gate 3 — Self-Health (Dogfood)
|
||||||
|
|||||||
Reference in New Issue
Block a user