Files
cacti/.github/workflows/cli-coverage.yml
T
Thomas Vincent 1ae479d4f5 feat(cli): add unified command frontend and normalize legacy failures (#7903)
* feat(cli): add unified command frontend and normalize legacy failures

Add the Symfony-backed bin/cacti entry point while preserving legacy argument, terminal, signal, and exit-status behavior. Fold in the focused legacy CLI correctness fixes from #7906 without adding its unused parser abstraction.

Keep path containment and the PHP 8.3 floor out of this review; the latter remains in #7939.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(cli): enforce PHP floor and deny web dispatch

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-09-07 18:36:55 -07:00

79 lines
2.1 KiB
YAML

name: CLI Coverage
on:
push:
branches: [develop]
paths:
- '.github/workflows/cli-coverage.yml'
- '.github/actions/setup-php-composer/**'
- 'composer.json'
- 'composer.lock'
- 'bin/cacti'
- 'bin/.htaccess'
- 'include/cli_check.php'
- 'include/cli_only.php'
- 'lib/Console/**'
- 'phpunit-cli-coverage.xml'
- 'tests/fixtures/Console/**'
- 'tests/.htaccess'
- 'tests/index.php'
- 'tests/Unit/Core/Cli/CactiApplicationTest.php'
- 'tests/Unit/Core/Cli/CactiEntrypointSecurityTest.php'
pull_request:
branches: [develop]
paths:
- '.github/workflows/cli-coverage.yml'
- '.github/actions/setup-php-composer/**'
- 'composer.json'
- 'composer.lock'
- 'bin/cacti'
- 'bin/.htaccess'
- 'include/cli_check.php'
- 'include/cli_only.php'
- 'lib/Console/**'
- 'phpunit-cli-coverage.xml'
- 'tests/fixtures/Console/**'
- 'tests/.htaccess'
- 'tests/index.php'
- 'tests/Unit/Core/Cli/CactiApplicationTest.php'
- 'tests/Unit/Core/Cli/CactiEntrypointSecurityTest.php'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: cli-coverage-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
COMPOSER_ALLOW_SUPERUSER: 1
jobs:
coverage:
name: CLI 100% coverage
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Setup locked PHP dependencies
uses: ./.github/actions/setup-php-composer
with:
php-version: '8.2'
coverage: xdebug
extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstring
dependency-mode: locked-cli-coverage
install-args: --prefer-dist --no-progress --no-interaction
- name: Enforce line coverage
env:
XDEBUG_MODE: coverage
run: |
set -euo pipefail
composer test:cli-coverage