phpunit
phpunit copied to clipboard
GitHub Actions for PHPUnit is failing on `mailparse`
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.
Two ideas for you:
- Please can you use actions/checkout@v3 and php-actions/composer@v6 ?
- Please can you install mbstring before mailparse, with
php_extensions: mbstring mailparse pdo_mysql
?
Thanks!
@g105b thanks a lot for the reply. Let me try your suggestion and come back to you soon. :)
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. :)
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.
I'm tidying up some old issues. Is this still affecting anyone?