heroku / php-getting-started

Getting Started with PHP on Heroku.
https://devcenter.heroku.com/articles/getting-started-with-php
194 stars 780 forks source link

Add example tests, that can be run by Heroku CI #53

Open edmorley opened 2 years ago

edmorley commented 2 years ago

I tried enabling Heroku CI on a Heroku pipeline linked to this repository, however the CI run failed with:

-----> Running PHP buildpack tests...
realpath: vendor/bin: No such file or directory
Trying to auto-detect test framework; first match will be found. You may use composer script 'test', or app.json, to specify what to run.
No tests found. Please use composer script 'test', or app.json, to specify what to run.
-----> PHP buildpack tests failed with exit status 1

(see https://dashboard.heroku.com/pipelines/fd8213bf-4356-40a1-aab8-c7042a64713e/tests/1)

I think it would be useful to add some example tests to this repo, since:

  1. It gives people something on which they can base their own tests
  2. They can help verify the correctness of this example project, so we're not just relying on Review Apps.
edmorley commented 2 years ago

cc @dzuelke

dzuelke commented 1 month ago

FWIW, the error message is not the cause for no tests being found (it's due to the cwd being the buildpack dir when the .profile.d scripts get executed).