diff --git a/.github/workflows/buid_release.yaml b/.github/workflows/buid_release.yaml index 5c8cc7a80f..6ffb1f0da5 100644 --- a/.github/workflows/buid_release.yaml +++ b/.github/workflows/buid_release.yaml @@ -36,7 +36,7 @@ jobs: rm -rf vendor/phpcsstandards/php_codesniffer/src/Standards/*/Docs/ # remove tests and useless files, to make downgraded, scoped and deployed codebase as small as possible - rm -rf vendor/phpcsstandards/php_codesniffer/src/Reports vendor/phpcsstandards/php_codesniffer/src/Filters vendor/phpcsstandards/php_codesniffer/src/Generators vendor/friendsofphp/php-cs-fixer/src/Linter vendor/friendsofphp/php-cs-fixer/src/Runner vendor/friendsofphp/php-cs-fixer/src/Documentation vendor/friendsofphp/php-cs-fixer/src/Cache vendor/friendsofphp/php-cs-fixer/src/Console/Output vendor/friendsofphp/php-cs-fixer/src/Console/Report vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate vendor/friendsofphp/php-cs-fixer/src/Console/Application.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/Documentation.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/WorkerCommand.php vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php + rm -rf vendor/phpcsstandards/php_codesniffer/src/Reports vendor/phpcsstandards/php_codesniffer/src/Filters vendor/phpcsstandards/php_codesniffer/src/Generators vendor/friendsofphp/php-cs-fixer/src/Linter vendor/friendsofphp/php-cs-fixer/src/Runner vendor/friendsofphp/php-cs-fixer/src/Documentation vendor/friendsofphp/php-cs-fixer/src/Cache vendor/friendsofphp/php-cs-fixer/src/Console/Output vendor/friendsofphp/php-cs-fixer/src/Console/Report vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/Documentation.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php vendor/friendsofphp/php-cs-fixer/src/Console/Command/WorkerCommand.php vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php # 1. copy files to $NESTED_DIRECTORY directory Exclude the scoped/nested directories to prevent rsync from copying in a loop - run: rsync --exclude ecs-build -av * ecs-build --quiet diff --git a/.github/workflows/version_command.yaml b/.github/workflows/version_command.yaml new file mode 100644 index 0000000000..28b95f4e6b --- /dev/null +++ b/.github/workflows/version_command.yaml @@ -0,0 +1,40 @@ +name: Version Command + +# verifies https://github.com/easy-coding-standard/ecs-src/issues/8 +# the published, scoped + downgraded package must keep a working "ecs --version", +# which prints the bundled PHP-CS-Fixer version + +on: + pull_request: + push: + branches: + - main + tags: + - '*' + schedule: + # weekly, to catch a broken published release even without a new tag + - cron: '0 6 * * 1' + +jobs: + version_command: + runs-on: ubuntu-latest + + steps: + - + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + coverage: none + + - run: mkdir nested-dir + + - run: composer require symplify/easy-coding-standard --ansi + working-directory: nested-dir + + - + name: "ecs --version must print the PHP-CS-Fixer line" + working-directory: nested-dir + run: | + OUTPUT="$(vendor/bin/ecs --version --ansi)" + echo "$OUTPUT" + echo "$OUTPUT" | grep -q 'PHP-CS-Fixer'