Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI crashes without scripts dependencies #15

Open
4 tasks
nicomollet opened this issue May 21, 2024 · 0 comments
Open
4 tasks

CI crashes without scripts dependencies #15

nicomollet opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nicomollet
Copy link

Describe the bug

In a CI, the tests won't pass if scripts are excluded from dependencies on composer install.

See full error:

Run composer run-tests

> "vendor/bin/phpunit" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist
PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.33
Configuration: tests/Unit/phpunit.xml.dist

No tests executed!
> "vendor/bin/phpunit" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Warning: PHP Warning:  fopen(/home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor-prefixed/wp-launchpad/core/inc/boot.php): failed to open stream: No such file or directory in /home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php on line 151
;\Patchwork\CodeManipulation\Stream::reinstateWrapper();
Warning: PHP Warning:  require(/home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor-prefixed/wp-launchpad/core/inc/boot.php): failed to open stream: "Patchwork\CodeManipulation\Stream::stream_open" call failed in /home/runner/work/wp-rocket-changelog/wp-rocket-changelog/wprocketchangelog.php on line 16
Error: PHP Fatal error:  require(): Failed opening required '/home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor-prefixed/wp-launchpad/core/inc/boot.php' (include_path='.:/usr/share/php') in /home/runner/work/wp-rocket-changelog/wp-rocket-changelog/wprocketchangelog.php on line 16
Warning: fopen(/home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor-prefixed/wp-launchpad/core/inc/boot.php): failed to open stream: No such file or directory in /home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php on line 151

See CI job

To Reproduce
Steps to reproduce the behavior:

  1. Create a CI with install dependencies - name: Install dependencies run: composer install --prefer-dist --no-interaction --no-scripts
  2. See the tests fail with failed to open stream: No such file or directory in /home/runner/work/wp-rocket-changelog/wp-rocket-changelog/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php on line 151

Expected behavior
Tests (run composer run-tests) should pass.

CI needs to be changed to:

      - name: Install dependencies
        run: composer install --prefer-dist --no-interaction

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@CrochetFeve0251 CrochetFeve0251 added the bug Something isn't working label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants