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

Convert Travis tests to GitHub actions #16

Merged
merged 3 commits into from
Nov 24, 2024

Conversation

duboism
Copy link
Contributor

@duboism duboism commented Sep 2, 2024

Travis no longer gives free access to free projects. Therefore, this PR converts the test suite to GitHub actions.

Technical details

Here are a few notes:

  • The test suite itself is not changed. It still work from 5.6 to 7.4
  • We use Setup PHP Action to set up PHP.
  • pear must be run with sudo. Therefore, for now, we test only on Ubuntu and macOS because there is no sudo on Windows.
  • The action is configured to run on pull requests and when pushing on certain branches.
  • The action can be launched manually from GitHub interface (at least from @duboism/HTML_Template_IT): go in the Actions tab, select Main on the left and in the drop box, select branch github_actions_master and then click the Run workflow button.

Relation to #15 and #17

As of 2186e20, #15 is a bit buggy (conflicts in versions of PHPUnit).

This PR was developed to simplify the development of #15 but since then I found a better approach to modernize the test suite which is in #17.

#17 is based on this branch so merging this would greatly help.

The test suite itself is not changed.
For now we test only on Ubuntu and macOS
because we need sudo.
@Neustradamus
Copy link

@duboism: Good job!

@duboism
Copy link
Contributor Author

duboism commented Sep 15, 2024

@duboism: Good job!

Just to know: did you try to run the actions ?

@duboism
Copy link
Contributor Author

duboism commented Sep 15, 2024

While paying a bit more attention to the test output, I noticed that PHPUnit warns about some deprecated code (namely, the dynamic creation of a property which is deprecated since PHP 8.2). I will address that in another PR.

There is another deprecation: the XML configuration file for PHPUnit changed in version 10. I guess this should be addressed at some point too.

@duboism
Copy link
Contributor Author

duboism commented Oct 1, 2024

@pear ?

@duboism
Copy link
Contributor Author

duboism commented Oct 1, 2024

By the way, I realized that some pear packages (like pear/pear-core) already moved to GitHub actions. AFAICS, the actions are similar to what I propose here but if somebody knows better, don't hesitate.

The file is deprecated for recent PHPUnit.
@duboism duboism force-pushed the github_actions_master branch from 6f85416 to ca1c19c Compare October 11, 2024 22:09
@duboism
Copy link
Contributor Author

duboism commented Oct 11, 2024

There is another deprecation: the XML configuration file for PHPUnit changed in version 10. I guess this should be addressed at some point too.

I removed the configuration file and updated the actions.

@ashnazg ashnazg self-assigned this Nov 24, 2024
@ashnazg ashnazg merged commit 5d30a9d into pear:master Nov 24, 2024
@duboism
Copy link
Contributor Author

duboism commented Nov 24, 2024

Thank you @ashnazg !

@duboism duboism deleted the github_actions_master branch November 24, 2024 20:23
@Neustradamus
Copy link

Thanks to @duboism for this PR and @ashnazg for merging!
Good job!

Can you add "Issues" section?

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.

3 participants