Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PhantomJS to CircleCI config or document #79

Open
byrond opened this issue Oct 26, 2018 · 1 comment
Open

Add PhantomJS to CircleCI config or document #79

byrond opened this issue Oct 26, 2018 · 1 comment

Comments

@byrond
Copy link
Contributor

byrond commented Oct 26, 2018

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.

@damontgomery
Copy link

For the Federated Search Demo, I put in a PR to set up Chrome Headless. I haven't tried that for Circle CI, but I think that's the recommendation since PhantomJS is no longer under active development.

palantirnet/the-vagrant#62

@byrond byrond mentioned this issue Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants