Just want to capture this somewhere, because it came up on another project.
Projects often need to have tests where JavaScript is required during testing. This requires the use of PhantomJS, but it isn't started by default and has been moved to the browsers-legacy Docker image variant on CircleCI. This usually requires the following change:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index bb1e491d..02576053 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/akamai
docker:
- - image: circleci/php:7.1-node-browsers
+ - image: circleci/php:7.1-node-browsers-legacy
- image: tkuchiki/delayed-mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
@@ -77,6 +77,10 @@ jobs:
# Dockerize is preinstalled in circleci/* docker image
command: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
+ - run:
+ name: Start PhantomJS
+ command: phantomjs --webdriver=8643
+ background: true
- run:
name: Build Drupal's settings.php
command: vendor/bin/phing build
We should either add this to the standard config in the skeleton (if it is required often enough), or we should document how to enable PhantomJS for projects that need it.
Just want to capture this somewhere, because it came up on another project.
Projects often need to have tests where JavaScript is required during testing. This requires the use of PhantomJS, but it isn't started by default and has been moved to the
browsers-legacyDocker image variant on CircleCI. This usually requires the following change:We should either add this to the standard config in the skeleton (if it is required often enough), or we should document how to enable PhantomJS for projects that need it.