.gitのプロジェクトルートに.gitlab-ci.ymlを設置する PHPUnitによる単体テスト composer installによるビルドテスト .gitlab-ci.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
image: php:7.1-alpine stages: - build_test - unit_test composer: stage: build_test image: composer:1.9.0 script: - cp ./src/.env.example ./src/.env - cd src - composer install --prefer-dist --no-progress --ansi artifacts: paths: - src/vendor/ cache: paths: - src/vendor/ phpunit: stage: unit_test cache: paths: - vendor before_script: - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer script: - mv .env.example .env - composer install --prefer-dist --no-progress --ansi - php artisan key:generate - vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ dependencies: - composer |
爆速レンタルサーバならConoHa WING サーバはプロに全部お任 …