php-actions / phpunit

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

Action not work #7

Closed event15 closed 4 years ago

event15 commented 4 years ago
 PHPUnit (php-actions)0s

Run php-actions/phpunit@v1
  with:
    config: forum/phpunit.xml
    bootstrap: forum/qa-tests/autoload.php
    memory: 512M
    junit: test/phpunit/_junit/junit.xml
/usr/bin/docker run --name e87b52efcb2d79f9ac446f8c26b531c6e0a3ce_f0f8a4 --label e87b52 --workdir /github/workspace --rm -e INPUT_CONFIG -e INPUT_BOOTSTRAP -e INPUT_MEMORY -e INPUT_JUNIT -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/forum.pasja-informatyki.local/forum.pasja-informatyki.local":"/github/workspace" e87b52:efcb2d79f9ac446f8c26b531c6e0a3ce  "-c" "forum/phpunit.xml" "--log-junit" "test/phpunit/_junit/junit.xml" "-d" "memory_limit=512M" "--bootstrap" "vendor/autoload.php"
PHPUnit 8.5.2 by Sebastian Bergmann and contributors.

Cannot open file "vendor/autoload.php".
event15 commented 4 years ago

I used the master version and it worked :)

g105b commented 4 years ago

Yep, the bootstrap argument has only recently been added thanks to #5

event15 commented 4 years ago

@g105b thanks to your reply :) By the way, I would like to ask if there is a possibility to choose a PHP version other than 7? Or are you planning such a development of your project?

g105b commented 4 years ago

The only constraint that has been added to this Github Action is that we use PHPUnit ^8.0. Inspecting the PHPUnit source, it seems that they have decided to require PHP 7.2 or greater: https://github.com/sebastianbergmann/phpunit/blob/8.5/composer.json#L24

If you think it would be beneficial to use another version of PHPUnit, this could be maintained on a separate branch, but I doubt there will be much of a need. It may be best to fork this repository and adjust the PHPUnit version in the fork.

I hope that helps you out a little.