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

Multi PHP + Multi Environment + Check all commits #212

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

javiercasares
Copy link
Contributor

@javiercasares javiercasares commented Mar 16, 2024

This is the Cloudfest Hackathon 2024 PR.

This PR solves:

  • Multi PHP. There is a new env option where you can set all the different PHP versions you want to test.
  • Multi Environment. You can set a label to differentiate, for example, your “shared”, “vps”, or “cloud” setups.
  • Check all commits. Until now, only the latest commit can be checked. With this new option, we can check the latest 10 commits so none of the commits are missing if they are approved without a lot of time between them.

The test-reporter will be upgraded to comply with these changes.

@javiercasares
Copy link
Contributor Author

- add the label
- test dir is a dir (a tmp one)
- no cert validation by default
- simple WP by default
- support for labels
- read latest commits
@javiercasares
Copy link
Contributor Author

The code is not very beauty, but it should work...

@javiercasares javiercasares marked this pull request as ready for review March 17, 2024 14:21
@javiercasares javiercasares changed the title Multi PHP Multi PHP + Multi Environment + Check all commits Mar 17, 2024
this is a first step to include some documentation inside the project, and not only in the handbook page.
.env.default Outdated Show resolved Hide resolved
docs/1-setup.md Outdated Show resolved Hide resolved
docs/1-setup.md Outdated Show resolved Hide resolved
docs/1-setup.md Outdated Show resolved Hide resolved
docs/1-setup.md Outdated Show resolved Hide resolved
functions.php Outdated Show resolved Hide resolved
prepare.php Outdated Show resolved Hide resolved
prepare.php Outdated Show resolved Hide resolved
report.php Show resolved Hide resolved
prepare.php Outdated Show resolved Hide resolved
javiercasares and others added 2 commits September 28, 2024 09:53
Co-authored-by: Matthias Pfefferle <[email protected]>
Co-authored-by: Matthias Pfefferle <[email protected]>
javiercasares and others added 12 commits September 28, 2024 09:53
Co-authored-by: Matthias Pfefferle <[email protected]>
Co-authored-by: Matthias Pfefferle <[email protected]>
Co-authored-by: Matthias Pfefferle <[email protected]>
Co-authored-by: Matthias Pfefferle <[email protected]>
Co-authored-by: Matthias Pfefferle <[email protected]>
- Descriptions in 80 chars columns
- Some Yoda fixes
- Fix the "tab" vs "space"
- Check some "comments" that should not be there (they were because some errors on the developing era)
- Better comments / PHPDoc
- Improved code quality (do the same, in a better way)
- reduce duplicated code (that's something we didn't care at Cloudfest)
- updated the Runner Compatibity with PHP 7.2 (as WordPress is)
- Improved readability
- default .env updated from source
- other fixes
- better documentation
- details on each value at the configuration file
- scripts so you can run (and update) the software automatically.
@javiercasares
Copy link
Contributor Author

I applied the suggestion @pfefferle did on WordCamp Europe, and reduce a lot of duplicated code that we couldn't do at the Cloudfest Hackathon, mostly on the parts when testing multiple PHP versions.

I did some improvements on the documentation, with some scripts so the software (from the main branch) is updated and maintained automatically.

I've been doing some tests in my local machine, and on my production server (where I was doing the former tests) and looks like everything is working.

On my side, I think everything is in order, and we can approve this and put it available for everyone.

@benniledl
Copy link
Contributor

benniledl commented Oct 2, 2024

Running tests in parallel?

Running the PHPUnit test suite across 7 different PHP versions is taking a long time in my environment. Is there a way to run the tests in parallel to speed things up?

Preparing a new environment for every version necessary?

Also, is it necessary to create a completely new environment for each PHP version? So far, I've been running the prepare.php file for the first PHP version, running the tests then report.php then using a script to search and replace the PHP executable in the configuration files before rerunning the tests and reporting again. This approach seemed to work.

Copying the environment + Running in parallel

I could see that using the same environment for multiple php versions in parallel could cause problems, is it maybe possible to just copy one environment to a different directory and then replace the php version in the config? Since preparing an environment also takes a long time for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Process all commits Update Runner to Support Multiple Report Submissions From Hosts
3 participants