I have this config
version: 2
jobs:
build:
working_directory: /var/www/html
docker:
- image: circleci/php:7.3.3
- image: circleci/mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_USER: homestead
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: blog_test
steps:
# Installation
- run:
name: Install System Packages
command: sudo apt-get update && sudo apt-get -y install git unzip zlib1g-dev
- run:
name: Install PHP Extensions
command: |
sudo docker-php-ext-install pdo
sudo docker-php-ext-install pdo_mysql
sudo docker-php-ext-install zip
sudo apt install -y mysql-client
- run:
name: Install Composer
command: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
chmod +x ./composer.phar && \
mv ./composer.phar /usr/local/bin/composer
# Dependencies
- checkout
- run: composer install --prefer-dist --no-interaction
- run: ./bin/phpunit --version
# Database
- run: ./bin/console doctrine:database:create --env=test --no-interaction
- run: ./bin/console doctrine:schema:create --env=test --no-interaction
- run: ./bin/console doctrine:fixtures:load --env=test --no-interaction
# To use server:start we need to install pcntl extension
- run:
name: Run web server in background
command: ./bin/console server:run
background: true
# Testing
- run: ./bin/phpunit
But it return error on Checkout code
Directory (/var/www/html) you are trying to checkout to is not empty and not a git repository
What should I set working_directory
to?