php-actions / phpunit

Run PHPUnit tests in Github Actions.
111 stars 25 forks source link

process exit error #69

Open Buffele opened 3 months ago

Buffele commented 3 months ago

My yml is as follows:

      - name: Run Tests
        uses: php-actions/phpunit@master
        with:
          version: "11.2.8"
          php_version: "8.3"
          php_extensions: "gd mysqli sockets imagick ssh2"
          bootstrap: "app/autoload.php"
          configuration: "tests/phpunit.xml"

Getting the following error since today:

Run php-actions/phpunit@master
  with:
    version: 11.2.8
    php_version: 8.3
    php_extensions: gd mysqli sockets imagick ssh2
    bootstrap: app/autoload.php
    configuration: tests/phpunit.xml
Run set -e
Error: Process completed with exit code 1.

Previously everything was running fine and I didn't touch anything regarding github actions, the .yml file or phpunit configuration or tests.

Any ideas?

jorycadence commented 3 months ago

Same here, our GH Action has been in place for months. It started failing for us this morning with no changes.

This has happened to us one other time and the issue resolved itself after a few hours.

I am not able to identify why it's failing.

jorycadence commented 3 months ago

To fix this I changed: uses: php-actions/phpunit@master to: uses: php-actions/phpunit@v3 in my yml. Not sure why I chose to use master when I first set them up. I'm sure you could also use v4 if you'd like.

huelsmc commented 3 months ago

It seems the fix does not work anymore ... seems like the issue is also in specific versions v3 + v4 now

g105b commented 3 months ago

If you re-run with debug logs, does it say anything about ghcr.io? There was an outage yesterday, but it resolved itself within minutes.

Buffele commented 3 months ago

Just re-run without debug logs and still the same error.

How do I enable debug logs?

g105b commented 3 months ago

image

image

Buffele commented 3 months ago

Thanks!

No, it does not say anything about ghcr.

g105b commented 3 months ago

hmmmmmpf let me do some investigations. I'm currently pushing some commits that are tested with this action... will report back here.

Buffele commented 3 months ago

Should be related to the latest commit from yesterday: https://github.com/php-actions/phpunit/commit/69225c0008acef7faf961624433e933530e105a4

g105b commented 3 months ago

@Buffele you are right. I have reverted it in https://github.com/php-actions/phpunit/pull/70 and I'll figure out what the cause is when I have some time to put aside, as I had previously tested the PR with no side effects.

mschielmann commented 2 months ago

The pipelines still fail for me on @v3 and @master. Could the reverted code be released? If there is any workaround, then I would greatly appreciate your suggestions.

mschielmann commented 2 months ago

For anyone who’s interested. This warning seems to be causing this issue:

1) Using comma-separated values with --test-suffix is deprecated and will no longer work in PHPUnit 12. You can use --test-suffix multiple times instead.

It seems that having this warning printed causes the action to be considered as faulty.

The workaround is to use:

with:
   test-suffix: Test.php
   ...

assuming you’re using only one test suffix. If you’re using more, then there is no way of solving it afaik, as the default is set to:

ACTION_TEST_SUFFIX: Test.php,.phpt

If I have time I may be able to provide a fix for it here via PR.

This has been described here as well: https://github.com/php-actions/phpunit/issues/68

Buffele commented 2 months ago

Throws a warning

Warning: Unexpected input(s) 'test-suffix', valid inputs are ['version', 'php_version', 'php_extensions', 'vendored_phpunit_path', 'configuration', 'log_junit', 'log_teamcity', 'testdox_html', 'testdox_text', 'memory_limit', 'bootstrap', 'filter', 'testsuite', 'group', 'exclude_group', 'test_suffix', 'whitelist', 'coverage_filter', 'coverage_clover', 'coverage_cobertura', 'coverage_crap4j', 'coverage_html', 'coverage_php', 'coverage_text', 'coverage_xml', 'args']

But at least the phpunit step does not error out for me anymore.

Also working again on latest @v4 for me.

Thanks!