phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

process exit error

Open Buffele opened this issue 1 year ago • 14 comments

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?

Buffele avatar Jul 29 '24 16:07 Buffele

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 avatar Jul 29 '24 17:07 jorycadence

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.

jorycadence avatar Jul 29 '24 17:07 jorycadence

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

huelsmc avatar Jul 30 '24 03:07 huelsmc

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.

g105b avatar Jul 30 '24 13:07 g105b

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

How do I enable debug logs?

Buffele avatar Jul 30 '24 13:07 Buffele

image

image

g105b avatar Jul 30 '24 13:07 g105b

Thanks!

No, it does not say anything about ghcr.

Buffele avatar Jul 30 '24 13:07 Buffele

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

g105b avatar Jul 30 '24 14:07 g105b

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

Buffele avatar Jul 30 '24 14:07 Buffele

@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.

g105b avatar Jul 30 '24 15:07 g105b

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 avatar Aug 27 '24 16:08 mschielmann

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

mschielmann avatar Sep 10 '24 13:09 mschielmann

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!

Buffele avatar Sep 10 '24 21:09 Buffele

@mschielmann its:

with:
   test_suffix: Test.php

sl0wik avatar Nov 29 '24 19:11 sl0wik