openfoodfacts / openfoodfacts-laravel

Open Food Facts API wrapper for Laravel
MIT License
148 stars 17 forks source link

Tests are broken #18

Closed teolemon closed 2 years ago

teolemon commented 2 years ago

What

Part of

epalmans commented 2 years ago

hi @teolemon. I see tests pass on my dev pc. If they still don't at your end, could you kindly pinpoint which specific tests/assertions fail? tnx eddie

teolemon commented 2 years ago

Seems like a Git misconfiguration in the GitHub Action for tests: https://github.com/openfoodfacts/openfoodfacts-laravel/runs/7337141990?check_suite_focus=true

Run sudo-bot/action-scrutinizer@latest
/usr/bin/docker run --name botsudoactionscrutinizerlatest_4[7](https://github.com/openfoodfacts/openfoodfacts-laravel/runs/7337141990?check_suite_focus=true#step:10:8)2[8](https://github.com/openfoodfacts/openfoodfacts-laravel/runs/7337141990?check_suite_focus=true#step:10:9)bb --label 4cd98f --workdir /github/workspace --rm -e COMPOSER_PROCESS_TIMEOUT -e COMPOSER_NO_INTERACTION -e INPUT_CLI-ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -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 -e CI=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/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/openfoodfacts-laravel/openfoodfacts-laravel":"/github/workspace" botsudo/action-scrutinizer:latest  "--format=php-clover build/coverage.clover"
::debug CLI_ARGS: --format=php-clover build/coverage.clover

In RepositoryIntrospector.php line 3[9](https://github.com/openfoodfacts/openfoodfacts-laravel/runs/7337141990?check_suite_focus=true#step:10:10):

  Failed to retrieve commit parents. If you use a shallow git checkout, pleas  
  e checkout at least a depth of one.                                          

code-coverage:upload [--api-url API-URL] [--repository REPOSITORY] [--revision REVISION] [--format FORMAT] [--parent PARENT] [--] <coverage-file>
epalmans commented 2 years ago

ah I see. Seems to be due to Scrutinizer wanting more than 1 fetched commit in order for it to run codecov (see comment at https://github.com/marketplace/actions/action-scrutinizer). Now fixed on commit https://github.com/openfoodfacts/openfoodfacts-laravel/commit/450a5e64e4eb66deeb46d53fffe50bf2316c8518