laradock環境でcircleciにてphpunitを実行したいのですが、詰まっています。
- composer require phpunit/phpunit 実行 ->Nothing to install or updateとなりインストールされない
- vendor/bin/phpunit 実行 ->No such file or directory エラー
ディレクトリ構成
・.circleci
・laradock
・myProject
皆様のお力をお借りしたいです。どうぞよろしくお願いいたします
.circleci/config.yml
version: 2 jobs: build: docker: - image: circleci/php:7.2-node-browsers - image: circleci/mysql:8.0.18 environment: - DB_CONNECTION: testing steps: - checkout - setup_remote_docker - run: sudo apt-get update - run: name: composer command: | cd laradock && \ sudo docker-compose exec workspace composer require --dev phpunit/phpunit ^7.0 - run: name: UnitTest command: cd myProject && vendor/bin/phpunit
実行結果
HironorisMacBook-Pro:phpP_work hironori$ circleci build .circleci/config.yml Docker image digest: sha256:c4143f9042c7d5aee8ee03bd5ce1d414e9a4bbacfc89742c4b5410e170858106 ====>> Spin Up Environment Build-agent version () Docker Engine Version: 19.03.1 Kernel Version: Linux 48c2e1c064d0 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 Linux Starting container circleci/php:7.2-node-browsers image is cached as circleci/php:7.2-node-browsers, but refreshing... 7.2-node-browsers: Pulling from circleci/php Digest: sha256:789b0277d9ab4774e0032b31cfa4ee9126e9b26149a135b1c5b7454d8dc06da2 Status: Image is up to date for circleci/php:7.2-node-browsers using image circleci/php@sha256:789b0277d9ab4774e0032b31cfa4ee9126e9b26149a135b1c5b7454d8dc06da2 Starting container circleci/mysql:8.0.18 image is cached as circleci/mysql:8.0.18, but refreshing... 8.0.18: Pulling from circleci/mysql Digest: sha256:385f12ad8c8b229c37f80331794e969e72696918615ed1280a9aaac3a602f269 Status: Image is up to date for circleci/mysql:8.0.18 using image circleci/mysql@sha256:385f12ad8c8b229c37f80331794e969e72696918615ed1280a9aaac3a602f269 ====>> Container circleci/mysql:8.0.18 ====>> Preparing Environment Variables Using build environment variables: BASH_ENV=/tmp/.bash_env-localbuild-1583535663 CI=true CIRCLECI=true CIRCLE_BRANCH=develop CIRCLE_BUILD_NUM= CIRCLE_JOB=build CIRCLE_NODE_INDEX=0 CIRCLE_NODE_TOTAL=1 CIRCLE_REPOSITORY_URL=git@github.com:hironori11an/phpP_work.git CIRCLE_SHA1=17b27e8ced6df8fa519a42c2d59f24cd616a7d32 CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1583535663 CIRCLE_WORKING_DIRECTORY=~/project The redacted variables listed above will be masked in run step output.====>> Checkout code #!/bin/bash -eo pipefail mkdir -p /home/circleci/project && cd /tmp/_circleci_local_build_repo && git ls-files | tar -T - -c | tar -x -C /home/circleci/project && cp -a /tmp/_circleci_local_build_repo/.git /home/circleci/project ====>> Setup a remote Docker engine Using local docker engine bind-mounted ====>> sudo apt-get update #!/bin/bash -eo pipefail sudo apt-get update Hit:1 http://security.debian.org/debian-security buster/updates InRelease Hit:2 http://deb.debian.org/debian buster InRelease Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB] Fetched 49.3 kB in 0s (100 kB/s) Reading package lists... Done ====>> composer #!/bin/bash -eo pipefail cd laradock && \ sudo docker-compose exec workspace composer require --dev phpunit/phpunit ^7.0 ^@^@Do not run Composer as root/super user! See https://getcomposer.org/root for details ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead. Writing lock file Generating optimized autoload files Carbon 1 is deprecated, see how to migrate to Carbon 2. https://carbon.nesbot.com/docs/#api-carbon-2 You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it. > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: beyondcode/laravel-dump-server Discovered Package: fideloper/proxy Discovered Package: laravel/nexmo-notification-channel Discovered Package: laravel/slack-notification-channel Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. ====>> UnitTest #!/bin/bash -eo pipefail cd myProject && vendor/bin/phpunit /bin/bash: vendor/bin/phpunit: No such file or directory Error: Exited with code exit status 127 Step failed Error: runner failed (exited with 101) Task failed Step canceled Error: task failed HironorisMacBook-Pro:phpP_work hironori$
あなたの回答
tips
プレビュー