Skip to content

Commit

Permalink
Travis CI Memcache Service and Settings (#3082)
Browse files Browse the repository at this point in the history
* Start memcached service and add php extension.
* Check status of memcached service.
* Use blt memcache config on CI.
  • Loading branch information
lcatlett authored and ba66e77 committed Sep 9, 2018
1 parent 0f39080 commit c7fd89c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ cache:
- "$HOME/.nvm"
- "/tmp/blt-sandbox-instance/.rules"

services:
- memcached

addons:
ssh_known_hosts: []
chrome: stable
Expand All @@ -44,6 +47,8 @@ before_install:
- source ${BLT_DIR}/scripts/travis/exit_early
# Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt.
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -K $encrypted_c0b166e924da_key -iv $encrypted_c0b166e924da_iv -in id_rsa_blt.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; ls -lash ~/.ssh; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa; fi
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo service memcached status
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
- composer self-update
Expand Down
2 changes: 1 addition & 1 deletion settings/cache.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @see https://www.drupal.org/node/2766509
*/
if ($is_ah_env &&
if (($is_ah_env || $is_ci_env) &&
array_key_exists('memcache', $settings) &&
array_key_exists('servers', $settings['memcache']) &&
!empty($settings['memcache']['servers'])
Expand Down

0 comments on commit c7fd89c

Please sign in to comment.