Skip to content

Use sapi/cli/php to run tests for faster failure #6931

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

Merged
merged 2 commits into from
Apr 30, 2021
Merged

Conversation

nikic
Copy link
Member

@nikic nikic commented Apr 30, 2021

No description provided.

@krakjoe
Copy link
Member

krakjoe commented Apr 30, 2021

The build is installed, doesn't it already use that binary ?

@nikic
Copy link
Member Author

nikic commented Apr 30, 2021

Oh right. Actual motivation here is to fail hard if the build step fails. We always run tests even if previous steps failed (so that if one test job fails, others still run), but we don't want to run tests if the build itself fails. If we do, the tests end up hanging and will time out. So this was my idea for an easy way to bail if the build failed.

@krakjoe
Copy link
Member

krakjoe commented Apr 30, 2021

That seems like it will work ... maybe break it and see how it behaves ?

Fail quite quickly is what I expect ... not sure what it might do to test data.

@nikic
Copy link
Member Author

nikic commented Apr 30, 2021

Seems to work file. Test count for successful build is same as before (128204) and the test job fails in 1s if the build failed.

Need to adjust macos tests as well though, as these are implemented separately...

@krakjoe
Copy link
Member

krakjoe commented Apr 30, 2021

That seems okay ....

I think it might be possible to use a combination of dependsOn and condition to make it even cleaner ... but playing with this was a headache, and we might have already tried during initial setup.

@nikic
Copy link
Member Author

nikic commented Apr 30, 2021

I think it might be possible to use a combination of dependsOn and condition to make it even cleaner ... but playing with this was a headache, and we might have already tried during initial setup.

I also looked at that, but from what I understood, dependsOn is a feature for jobs and stages, while we're only working with steps here. We'd have to convert some of the steps into stages, and that seems like too much hassle ^^

@krakjoe
Copy link
Member

krakjoe commented Apr 30, 2021

Yeah agree, probably too much hassle ... and I got this feeling we have already tried ...

@nikic nikic changed the title Use built PHP to run tests Use sapi/cli/php to run tests for faster failure Apr 30, 2021
@nikic nikic merged commit 8fc5dae into php:master Apr 30, 2021
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.

2 participants