Skip to content

Commit

Permalink
Merge pull request #1 from dennisinteractive/CMS-96_scaffolding
Browse files Browse the repository at this point in the history
CMS-96 Scaffolding tool
  • Loading branch information
tashaharrison authored Mar 28, 2019
2 parents 65fe2f2 + f398ef4 commit 5555147
Show file tree
Hide file tree
Showing 17 changed files with 950 additions and 135 deletions.
58 changes: 58 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PHP CircleCI 2.0 configuration file
version: 2
jobs:
build:
docker:
- image: dennisdigital/drupalci:8-apache-interactive
steps:
- checkout

- run:
name: Build
command: |
if [ -z "${PACKAGIST_TOKEN}" ]; then echo "Env variable PACKAGIST_TOKEN missing, get a token from packagist.org"; exit 1; fi
composer config --global --auth http-basic.repo.packagist.com dennisdigital ${PACKAGIST_TOKEN}
composer create-project dennisdigital/polaris-drupal-project:dev-CMS-96_scaffolding /var/www/polaris --stability dev --no-interaction
- run:
name: Install profile
command: cd /var/www/polaris/web && sh profiles/contrib/polaris/scripts/install.sh

- run:
name: Run tests
command: |
cd /var/www/polaris/web
sudo -u www-data php core/scripts/run-tests.sh --keep-results --color --concurrency "31" --sqlite sites/default/files/.ht.sqlite --verbose --suppress-deprecations --url http://localhost:80 --non-html polaris
cd /var/www/polaris && sudo -u www-data ./vendor/bin/phpunit
- store_artifacts:
path: /var/www/polaris/web/sites/default/files/simpletest
destination: /tmp/results/simpletest

- store_artifacts:
path: /var/www/polaris/web/sites/simpletest/browser_output
destination: /tmp/results/simpletest/browser_output

- store_artifacts:
path: /var/www/polaris/web/sites/default/files/behat-verbose
destination: /tmp/results/behat-verbose

- store_artifacts:
path: /var/log/messages
destination: /tmp/results/logs

- store_test_results:
path: /tmp/results

- save_cache:
key: composer
paths:
- ~/.composer/cache

workflows:
version: 2
build:
jobs:
# - build
- build:
context: packagist
12 changes: 12 additions & 0 deletions .env.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Default private file path
DRUPAL_FILE_PRIVATE_PATH=private

# Default DB credentials.
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=
MYSQL_ROOT_PASSWORD=
MYSQL_HOSTNAME=127.0.0.1

# Another common use case is to set Drush's --uri via environment.
# DRUSH_OPTIONS_URI=http://example.com
27 changes: 11 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
drush/contrib
vendor
bin
docroot/core
docroot/libraries
docroot/modules/contrib
docroot/themes/contrib
docroot/profiles/contrib
web/core
web/libraries
web/modules/contrib
web/themes/contrib
web/profiles/contrib

# Ignore Drupal's file directory
docroot/sites/default/files
web/sites/default/files
private/*
tmp/*

Expand All @@ -19,20 +19,15 @@ tmp/*
# Ignore apple stuff
.DS_Store

# Ignore configuration files that may contain sensitive information.
docroot/sites/*/settings.local.php
docroot/sites/*/settings.devdesktop.php
docroot/sites/*/services*.yml
# Ignore sensitive information
web/sites/*/settings.local.php

# Ignore paths that contain user-generated content.
docroot/sites/*/files
docroot/sites/*/private
web/sites/*/files
web/sites/*/private

# Ignore SimpleTest multi-site environment.
docroot/sites/simpletest

# Ignore Acquia Dev Desktop configs.
docroot/sites/*.dd
web/sites/simpletest

# Ignore .env files as they are personal
/.env
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: php
dist: trusty
sudo: false

php:
- 5.6
- 7.0
- 7.1
- 7.2

env:
global:
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
matrix:
- RELEASE=stable COMPOSER_CHANNEL=stable
- RELEASE=dev COMPOSER_CHANNEL=stable
- RELEASE=stable COMPOSER_CHANNEL=snapshot

matrix:
exclude:
- php: 5.6
env: RELEASE=dev COMPOSER_CHANNEL=stable
- php: 5.6
env: RELEASE=stable COMPOSER_CHANNEL=snapshot

before_install:
- if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi;
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- composer --verbose self-update --$COMPOSER_CHANNEL
- composer --version

install:
- composer --verbose validate
- composer --verbose install

script:
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev; fi;
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
- cd $TRAVIS_BUILD_DIR/web
- ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
- ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
# Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup
- ./../vendor/bin/drush
- if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi;
Loading

0 comments on commit 5555147

Please sign in to comment.