php-actions / phpunit

Run PHPUnit tests in Github Actions.
108 stars 24 forks source link

request :: phpspec #1

Closed chris-kruining closed 4 years ago

chris-kruining commented 4 years ago

Hi,

Is it an option for you to publish an alternative version of this package that runs phpspec instead of phpunit?

I'd love to drop my travis-ci in favor of a 'native' solution :D

g105b commented 4 years ago

Absolutely!

php-actions intents to provide a list of simple native Github actions - I too would love to drop all the large bulky tools. Next up on the list is Behat, so phpspec is a good addition.

Could you let me know some background to your requirements, as I don't use phpspec myself currently. If you could share your current workflow, how you execute your tests, etc. then this will help me understand the full picture so I can implement this.

chris-kruining commented 4 years ago

Could you let me know some background to your requirements, as I don't use phpspec myself currently. If you could share your current workflow, how you execute your tests, etc. then this will help me understand the full picture so I can implement this.

afaik its the same as phpunit. just different files

g105b commented 4 years ago

Cool OK, I'll get round to it tomorrow. I was planning on getting this org up to scratch over the next few days during PHP Scotland. I'll let you know here when I have an update for you.

chris-kruining commented 4 years ago

awesome, thanks!

chris-kruining commented 4 years ago

@g105b I haven't heard back from back from, I suspect you are busy, no worries. Can I help you in some way?

g105b commented 4 years ago

Hi, yes you guessed right. Sorry I haven't got round to this, I had intended to work on Github actions within the Scotland PHP conference, but time disappeared completely.

Something that would help me is if you could supply me with a project that currently runs phpspec so I can see the command working that will be replaced by the action. Hopefully you have something open source that currently uses Travis-ci for example?

I have made progress with composer and phpunit - they have both been successfully upgraded to the v2 actions syntax (YML), so there shouldn't be much work required to get phpspec working too.

chris-kruining commented 4 years ago

It is lacking in spec depth, but I have my utilities lib up and running in travis-ci https://github.com/chris-kruining/utilities https://travis-ci.org/chris-kruining/utilities

g105b commented 4 years ago

Thanks. I have not used phpspec before so I wanted to see an example of it in action. Pretty straightforward. I'll get a repo set up and you can have a play with Github actions :)

g105b commented 4 years ago

Please see https://github.com/php-actions/phpspec - you should be able to use this now!

I'll close this issue here, but feel free to open a discussion on the phpspec issue list. I am happy to help you, and I'm interested to learn more about phpspec and how you're using it.

Here's the repository where I've tested phpspec, by following the tutorial in the docs: https://github.com/g105b/phpspec-example

And here's the passing phpspec test run: https://github.com/g105b/phpspec-example/commit/a91f02311feddc5557b61c748f0af299c35fad8c/checks?check_suite_id=314486670

My plans are to introduce the newly introduced feature of dependency caching with all the php-actions repositories, which means I plan on pushing updates to the functionality of the actions which may not always be backwards compatible. So my work doesn't annoy you, please tie your actions to a specific version release by using the uses: php-actions/phpspec@vX.Y.Z syntax.

Once all functionality is implemented and I have tested the actions, I will release v1.0.0, which I will ensure will have no backwards incompatible changes pushed. Until then, please bear with me!