-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from palantirnet/circle-2.0
Circle 2.0
- Loading branch information
Showing
4 changed files
with
126 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# This circle.yml is for testing the drupal-skeleton. For project-specific | ||
# testing, use the circle.yml installed by palantirnet/the-build. | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/drupal-skeleton | ||
docker: | ||
- image: circleci/php:7.1-node-browsers | ||
- image: tkuchiki/delayed-mysql | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_ROOT_PASSWORD: '' | ||
MYSQL_DATABASE: circle_test | ||
|
||
environment: | ||
- PALANTIR_ENVIRONMENT: circle | ||
|
||
steps: | ||
- run: | ||
name: Install packages | ||
command: sudo apt-get install -y libpng-dev mysql-client | ||
- run: | ||
name: Install PHP extensions | ||
command: sudo docker-php-ext-install pdo_mysql gd | ||
- run: | ||
name: Configure PHP | ||
command: echo "sendmail_path=/bin/true" | sudo tee -a "/usr/local/etc/php/php.ini" | ||
- run: | ||
name: PHP version | ||
command: php -r 'phpinfo(INFO_GENERAL | INFO_CREDITS | INFO_CONFIGURATION | INFO_MODULES);' | ||
- run: | ||
name: Composer version | ||
command: composer --version | ||
- run: | ||
name: Create artifacts directory | ||
command: mkdir /tmp/artifacts | ||
- run: | ||
name: Configure URL in /etc/hosts | ||
command: echo 127.0.0.1 ${CIRCLE_PROJECT_REPONAME}.local | sudo tee -a /etc/hosts | ||
|
||
# Composer package cache | ||
- restore_cache: | ||
keys: | ||
- composer-v1- | ||
# Source cache | ||
- restore_cache: | ||
keys: | ||
- source-v1-{{ .Branch }} | ||
- source-v1- | ||
# Composer dependency cache | ||
- restore_cache: | ||
keys: | ||
- dependencies-v1-{{ .Branch }}- | ||
|
||
- checkout | ||
- run: | ||
name: Composer install / update | ||
command: composer update --no-interaction --prefer-dist | ||
|
||
# Composer package cache - update when the contents of the Composer cache directory | ||
# change | ||
- run: ls -1R ~/.composer/cache/ > /tmp/composer-cache.txt | ||
- save_cache: | ||
key: composer-v1-{{ checksum "/tmp/composer-cache.txt" }} | ||
paths: | ||
- ~/.composer | ||
# Source cache - update when branch changes | ||
- save_cache: | ||
key: source-v1-{{ .Branch }} | ||
paths: | ||
- ".git" | ||
# Composer dependency cache - update for every commit, because when this cache gets | ||
# polluted, builds will repeatedly fail. For this project, | ||
# the entire web/ directory is set up by the composer install process. | ||
- save_cache: | ||
key: dependencies-v1-{{ .Branch }}-{{ .Revision }} | ||
paths: | ||
- composer.lock | ||
- vendor | ||
- web | ||
- drush | ||
|
||
- run: | ||
name: Wait for DB | ||
# Dockerize is preinstalled in circleci/* docker image | ||
command: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s | ||
- run: | ||
name: Install and configure the-build | ||
command: > | ||
vendor/bin/phing -f vendor/palantirnet/the-build/tasks/install.xml | ||
-Dbuild.artifact_mode=symlink | ||
-Dbuild.test_output=/dev/null | ||
-Ddrupal.site_name=drupal-skeleton | ||
-Ddrupal.profile=standard | ||
-Ddrupal.modules_enable='' | ||
-Ddrupal.database.database=circle_test | ||
-Ddrupal.database.username=root | ||
-Ddrupal.database.password='' | ||
-Ddrupal.database.host=127.0.0.1 | ||
-Ddrupal.settings.file_public_path=sites/default/files | ||
-Ddrupal.settings.file_private_path= | ||
-Ddrupal.twig.debug=false | ||
-Ddrupal.uri=http://${CIRCLE_PROJECT_REPONAME}.local:8000 | ||
-Ddrupal.hash_salt=temporary | ||
-Ddrupal.root=web | ||
- run: | ||
name: Build Drupal's settings.php | ||
command: vendor/bin/phing build | ||
- run: | ||
name: Install Drupal | ||
command: vendor/bin/phing install | ||
- run: | ||
name: Run Behat tests | ||
command: | | ||
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 & | ||
vendor/bin/behat --profile=circle --suite=default --strict --format=junit --out=/tmp/artifacts | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
- store_test_results: | ||
path: /tmp/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters