-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace PhantomJS with headless Chrome in tests
Update our test/CI environment to a modern browser which matches what our users use and supports modern web APIs and ES language features. - Add a Dockerfile which defines an image that includes everything needed to run client tests and deployment steps. This image uses plain Alpine as the base rather than Debian as this makes it easier to update frequently (every 6 months) to get a current Chrome build. - Replace PhantomJS with Puppeteer for testing locally and on Travis. Jenkins uses Chromium packages from Alpine.
- Loading branch information
1 parent
8988a96
commit d7f22bb
Showing
6 changed files
with
867 additions
and
888 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Exclude large local dirs from the Docker build context to make the image build | ||
# faster. | ||
|
||
.git/ | ||
build/ | ||
coverage/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# nb. We use Alpine as a base image and then install Node + Yarn separately | ||
# rather than using a Node base image because this enables automated tools to | ||
# upgrade everything by simply updating the Alpine version. | ||
# | ||
# Alpine is updated every 6 months so all packages are pretty recent. | ||
FROM alpine:3.10 | ||
|
||
RUN apk update && apk add --no-cache \ | ||
chromium \ | ||
git \ | ||
make \ | ||
nodejs \ | ||
yarn | ||
|
||
# Do not download a Chrome build as part of installing the "puppeteer" package, | ||
# it won't work in Alpine. | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
# Enable test scripts to detect that they are running from the Docker image. | ||
ENV RUNNING_IN_DOCKER true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.