-
Notifications
You must be signed in to change notification settings - Fork 124
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
GitHub actions #512
GitHub actions #512
Conversation
…g --migrate-configuration!'
Hi Marius. Nice thanks, I'm not good at it either - especially not integrating it up against GitHub. But at least now we're two brains working on it haha. Maybe the error is because the project is using php-unit 6? Try adding this <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
bootstrap="tests/bootstrap.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="simple-php-router test suite">
<directory>tests/Pecee/SimpleRouter/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit> |
I would try to update the phounit version tomorrow if this is okay for you? ~ Marius |
Yeah that's cool no stress - feel free to update it, I just couldn't be bothered because the version it was using was working fine. Was too afraid that I had to rewrite many of the tests and have enough work on my hands as it is. Maybe it will just work without having to rewrite the tests- haven't tried. |
I know this feeling 😂 |
Hey Marius. Hope you haven't pulled out all your hair yet. Is the actions giving you trouble? I don't know if it can be of any help- but this one of my project has GitHub actions and are also using an elder version of php-unit. Maybe you can copy paste some of the configuration and remove any MySQL reference to get it working? Not sure what kind of action it uses, I can't remember to be honest, but I know that GitHub runs the unit tests when pushing to the repository. (files in the root directory, .yml + .xml) https://github.com/skipperbent/pecee-pixie / Simon |
Finally 🥳 I also changed the phpunit.xml to the latest version (I think) because the filter tag was not supported or shown in the new docs. I made a test if the tests would fail and they do. But currently every test return a success (look into the actions tab in my fork). ~ Marius |
Hey, I don't see any reference (a .github folder) to github actions in your project, but my version works now. Feel free to test it. ~ Marius |
Nice work! Looks good! Was is difficult updating the php-unit? I think the other project was before the github-actions had its own marketplace. Anyway as long as it's working and testing on push it's all good. Would it be possible to downgrade to php version 7.1? At least for this upcoming release 4.3? I do want to upgrade the php-version, but if we update it now, some users might not get the update because they're stuck on 7.1. Remember often times production environments are using old tech because it cost $$ to upgrade their code. |
PHPunit upgrade was okay, but to get into the GitHub Actions stuff was a bit difficult. |
Yeah i could imagine, they make it look so easy with their configuration - but in reality you need to know every little configuration parameter and read through tons of documentation. Great, but if it's too much work we can just add this to the major release. I'm thinking i will start work on v5 once v4.3 is released. |
Okay, PHP 7.1 is working now. I will create an other pull request for the next major update with the requirement of php 7.3. ~ Marius |
Wow, you're good. Tried setting up travis-ci - what nightmare 😄 Seems like there's some kind of php-bug, I get errors in test when running on travis but nothing locally. I can only get tests to semi-work when i set travis to use php 7.4.2 - but then it freezes during the tests. |
Is it ready to merge? |
The version is not that important.. as long as it's there. Lucikly the project is not really doing any advanced unit-testing that requires any special version of php-unit. |
Okay, never worked with travis-ci. |
Me neither, it's just uphill with all that configuration... again nice work, so cool that you got it working! I'll merge 👍 |
Hey,
you asked about a CI when the user are creating a pull request or you are pushing.
I had to delete
syntaxCheck="false"
, because it throws an error. But this option was useless according to the author of PHPUnit.The Problem is, that the PHPUnit tests are printing the following:
I'm not good with unit tests and don't know how to migrate this.
I think it has something to do that you are using Version
6
and github/php-actions/phpunit@v2
is using9.5.3
. Maby you can specify the unittest version?I will look more into it tomorrow. Maby you have an idea until then.
~ Marius