php-actions / phpunit

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

GitHub Actions for PHPUnit is failing on `mailparse` #47

Open williamgomes opened 1 year ago

williamgomes commented 1 year ago

I am using GitHub Actions to run PHPUnit for each push to a PR. I implemented this GitHub Action for PHPUnit and my YML file is as follows.

name: PHPUnit Tests

on: [push]

jobs:
  build-test:
    name: PHPUnit Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: php-actions/composer@v5
        with:
          php_extensions: mailparse pdo_mysql
          dev: no
          args: --profile --ignore-platform-reqs

      - name: PHPUnit Tests
        uses: php-actions/phpunit@v3
        with:
          php_version: 8.1

I am having below error from PHPUnit Action.

994393dc58e7: Layer already exists
1e74372f6dff: Pushed
php-latest-mailparse-pdo_mysql-build2: digest: sha256:17078db8c8e36a72ce937d8b5f98eb0c0b814b91a2c20e14788039763b722300 size: 2831
Docker tag: docker.pkg.github.com/synega/connect/php-actions_composer_connect:php-latest-mailparse-pdo_mysql-build2
No private keys supplied
Command: composer install --no-dev --no-progress --no-interaction --profile --ignore-platform-reqs
Error: Process completed with exit code 1.

How/where i can get private keys for mailparse? Or what is the error actually indicating? Any help will be much appreciated.

g105b commented 1 year ago

Two ideas for you:

1) Please can you use actions/checkout@v3 and php-actions/composer@v6 ? 2) Please can you install mbstring before mailparse, with php_extensions: mbstring mailparse pdo_mysql ?

Thanks!

williamgomes commented 1 year ago

@g105b thanks a lot for the reply. Let me try your suggestion and come back to you soon. :)

williamgomes commented 1 year ago

Hi @g105b I tried your solution, so now my phpunit.yml file looks like below

name: PHPUnit Tests

on: [push]

jobs:
  build-test:
    name: PHPUnit Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: php-actions/composer@v6
        with:
          php_extensions: mbstring mailparse pdo_mysql
          dev: no
          args: --profile --ignore-platform-reqs

      - name: PHPUnit Tests
        uses: php-actions/phpunit@v3
        with:
          php_version: 8.1

And i believe i am still receiving similar errors as before.

  994393dc58e7: Layer already exists
  c7583130e129: Pushed
  1e690d1d6dcc: Pushed
  php-latest-mbstring-mailparse-pdo_mysql-build2: digest: sha256:22bece23ca1bb7440af855fd688d9a16a0a043091a5b91c4f1c1d75159d7cfad size: 2832
  Docker tag: docker.pkg.github.com/synega/connect/php-actions_composer_connect:php-latest-mbstring-mailparse-pdo_mysql-build2
  No private keys supplied
  Command: composer install --no-dev --no-progress --no-interaction --profile --ignore-platform-reqs
Error: Process completed with exit code 1.

I hope that helps you to debug. :)

g105b commented 1 year ago

Thank you. It might be a difficult one to fix, but I'll look into it and hopefully we'll get a working test run.

g105b commented 5 months ago

I'm tidying up some old issues. Is this still affecting anyone?