-
Notifications
You must be signed in to change notification settings - Fork 2
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 #89 from palantirnet/circle-2.0
Configuration for Circle 2.0
- Loading branch information
Showing
6 changed files
with
160 additions
and
48 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,99 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/@projectname@ | ||
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 | ||
- DRUPAL_ROOT: web | ||
|
||
branches: | ||
ignore: | ||
- gh-pages | ||
- /.*(readme|documentation).*/ | ||
|
||
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- | ||
|
||
- checkout | ||
- run: | ||
name: Composer install | ||
command: composer install --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" | ||
|
||
- 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: Build Drupal's settings.php | ||
command: vendor/bin/phing build | ||
- run: | ||
name: Install Drupal | ||
command: vendor/bin/phing install | ||
- run: | ||
name: Run any migrations | ||
command: vendor/bin/phing migrate | ||
- run: | ||
name: Run code reviews | ||
command: vendor/bin/phing code-review | ||
- run: | ||
name: Run Behat tests | ||
command: | | ||
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/${DRUPAL_ROOT}/ > /tmp/artifacts/phpd.log 2>&1 & | ||
vendor/bin/phing test | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
default: | ||
suites: | ||
default: | ||
contexts: | ||
- FeatureContext | ||
- Drupal\DrupalExtension\Context\DrupalContext | ||
- Drupal\DrupalExtension\Context\MinkContext | ||
- Drupal\DrupalExtension\Context\MessageContext | ||
- Drupal\DrupalExtension\Context\DrushContext | ||
filters: | ||
tags: "~@skipci" | ||
gherkin: | ||
cache: ~ | ||
extensions: | ||
Behat\MinkExtension: | ||
goutte: ~ | ||
selenium2: | ||
wd_host: "http://127.0.0.1:8643/wd/hub" | ||
javascript_session: selenium2 | ||
base_url: http://@[email protected] | ||
Drupal\DrupalExtension: | ||
blackbox: ~ | ||
api_driver: 'drupal' | ||
drupal: | ||
drupal_root: 'web' | ||
text: | ||
username_field: 'name' | ||
password_field: 'pass' | ||
log_out: 'Log out' | ||
region_map: | ||
anywhere: "*" | ||
|
||
circle: | ||
extensions: | ||
Behat\MinkExtension: | ||
base_url: http://@[email protected]:8000 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
build.test_output=/tmp/artifacts | ||
drupal.database.database=circle_test | ||
drupal.database.username=root | ||
drupal.database.password= | ||
drupal.database.host=127.0.0.1 | ||
|
||
drupal.twig.debug=false | ||
|
||
behat.args=--profile=circle --suite=default --strict --format=junit --out=${build.test_output} --tags=~@skipci |
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 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