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

GH Actions: fix build #117

Closed
wants to merge 1 commit into from
Closed

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Dec 29, 2021

Both Composer, as well as PHPUnit have released new versions to try and fix the issue with tests being run with process isolation in combination with installation via Composer 2.2, which were resulting in the following error:

PHPUnit\Framework\Exception: PHP Fatal error:  strict_types declaration must be the very first statement in the script in /home/runner/work/BrainMonkey/BrainMonkey/vendor/phpunit/phpunit/phpunit on line 2

While that fixes the builds for runs against the highest versions of dependencies, it still does not solve the problem when running the tests with the lowest dependencies (or against PHP 5.6).

Those builds now hang indefinitely.

This commit attempts to fix this by using Composer 2.1 for builds against lowest dependencies and against PHP 5.6.

It also sets a 15 minute time-out for the test runs against the lowest dependencies to prevent builds being very slow in reporting.

Refs:


Note: I will rebase the other open PRs after this PR has been merged to get their builds passing.

Both Composer, as well as PHPUnit have released new versions to try and fix the issue with tests being run with process isolation in combination with installation via Composer 2.2, which were resulting in the following error:
```
PHPUnit\Framework\Exception: PHP Fatal error:  strict_types declaration must be the very first statement in the script in /home/runner/work/BrainMonkey/BrainMonkey/vendor/phpunit/phpunit/phpunit on line 2
```

While that fixes the builds for runs against the `highest` versions of dependencies, it still does not solve the problem when running the tests with the `lowest` dependencies (or against PHP 5.6).

Those builds now hang indefinitely.

This commit attempts to fix this by using Composer 2.1 for builds against `lowest` dependencies and against PHP 5.6.

It also sets a 15 minute time-out for the test runs against the `lowest` dependencies to prevent builds being very slow in reporting.

Refs:
* composer/composer#10387
* sebastianbergmann/phpunit#4846
* https://github.com/composer/composer/releases/tag/2.2.2
* https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-9.5.md#9511---2021-12-25
@jrfnl jrfnl added this to the 2.x Next milestone Dec 29, 2021
@jrfnl jrfnl requested a review from gmazzap December 29, 2021 17:36
@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 29, 2021

Some interesting additional information about this issue in the follow-up conversation here: composer/composer#10387 (comment)

@jrfnl jrfnl marked this pull request as draft December 30, 2021 15:37
@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 30, 2021

@gmazzap Looks like there may be a more comprehensive fix coming, so let's hold off on merging this one for now. I'm going to test the more comprehensive fix now.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 31, 2021

With the latest release of Composer (2.2.3), this PR is no longer necessary. The build for master is now passing again.

Closing this PR and I will be rebasing the other open PR to get passing builds.

@jrfnl jrfnl closed this Dec 31, 2021
@jrfnl jrfnl deleted the feature/fix-builds-against-lowest branch December 31, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant