Skip to content

Commit

Permalink
Replace CircleCI config with previous config version
Browse files Browse the repository at this point in the history
  • Loading branch information
iajon committed Jan 26, 2023
1 parent 02760ee commit 47a9066
Showing 1 changed file with 41 additions and 42 deletions.
83 changes: 41 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# This CircleCI configuration is for testing the drupal-skeleton. For project-specific
# testing, use the configuration installed by palantirnet/the-build.

version: 2.1
# To use browsers on CircleCI, uncomment the lines below and add steps to install them.
# For example, add these to `jobs.build.steps`:
# - browser-tools/install-chrome
# - browser-tools/install-chromedriver
# orbs:
# browser-tools: circleci/[email protected]
jobs:
build:
working_directory: ~/drupal-skeleton
Expand All @@ -19,48 +16,58 @@ jobs:

environment:
- PALANTIR_ENVIRONMENT: circleci
- DRUPAL_ROOT: docroot
- DRUPAL_ROOT: web
- NODE_VERSION: 8

steps:
- run:
name: Install packages
command: |
sudo apt-get update && sudo apt-get install -y libpng-dev default-mysql-client
- run:
name: Install nvm
command: |
set +e
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
touch $BASH_ENV
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
command: sudo apt-get update && sudo apt-get install -y default-mysql-client
- run:
name: Configure PHP
command: |
echo "sendmail_path=/bin/true" | sudo tee -a "/etc/php.d/circleci.ini"
- run:
name: Update Composer
command: |
sudo composer self-update
- 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
- run:
name: Update to latest version of Composer
command: sudo composer self-update

# Composer package cache
- restore_cache:
keys:
- composer-v1-
# Note: phing and drupal-check have mutually exclusive requirements.
# It'd be better to add drupal-check as a dependency of the drupal project
# rather than as part of the virtual environment, but this will have to do
# for now. Also note, drupal-check is added as part of the-vagrant so it
# is available to run within our VM.
- run:
name: Install drupal-check
command: |
curl -O -L https://github.com/mglaman/drupal-check/releases/download/1.0.9/drupal-check.phar
mkdir --parents ~/bin
mv drupal-check.phar ~/bin/drupal-check
chmod +x ~/bin/drupal-check
# Source cache
- restore_cache:
keys:
- source-v1-{{ .Branch }}
- source-v1-

- checkout

# Source cache - update when branch changes
- save_cache:
key: source-v1-{{ .Branch }}
paths:
- ".git"

# Composer package cache
- restore_cache:
keys:
- composer-v1-

- run:
name: Composer install
command: composer install --no-interaction --prefer-dist
Expand All @@ -71,17 +78,11 @@ jobs:
- save_cache:
key: composer-v1-{{ checksum "/tmp/composer-cache.txt" }}
paths:
- ~/.cache/composer
# Source cache - update when branch changes
- save_cache:
key: source-v1-{{ .Branch }}
paths:
- ".git"
- ~/.cache/composer

# Run code reviews before installing Drupal, so that tests fail earlier.
- run:
name: Run code reviews
command: vendor/bin/phing code-review
name: Install the-build in the project
command: printf 'drupal-skeleton\nhttp://drupal-skeleton.local\npantheon\nn' | vendor/bin/the-build-installer

- run:
name: Wait for DB
Expand All @@ -93,16 +94,14 @@ jobs:
command: vendor/bin/phing build
- run:
name: Install Drupal
command: vendor/bin/phing install
- run:
name: Run any migrations
command: vendor/bin/phing migrate
command: printf 'y' | vendor/bin/phing install -Ddrupal.validate_clean_config.bypass=yes -Ddrupal.sites.default.profile=standard
- 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
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 &
google-chrome --version
google-chrome --headless --remote-debugging-port=9222 &>/dev/null &
vendor/bin/behat --profile=circleci --suite=default --strict --format=junit --out=/tmp/artifacts
- store_artifacts:
path: /tmp/artifacts
- store_test_results:
Expand All @@ -117,4 +116,4 @@ workflows:
branches:
ignore:
- gh-pages
- /.*(readme|documentation).*/
- /.*(readme|documentation).*/

0 comments on commit 47a9066

Please sign in to comment.