This repository has been archived by the owner on Apr 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e19791b
commit b64ca3d
Showing
8 changed files
with
639 additions
and
11 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 |
---|---|---|
|
@@ -2,13 +2,12 @@ FROM mhart/alpine-node:latest | |
|
||
LABEL description "Run Google Chrome's Lighthouse Audit in the background" | ||
|
||
LABEL version "1.0.1" | ||
LABEL version="1.0.3" | ||
|
||
LABEL author "Matthias Winkelmann <[email protected]>" | ||
LABEL org.label-schema.vcs-url "https://github.com/MatthiasWinkelmann/lighthouse-chromium-alpine-docker" | ||
LABEL org.label-schema.uri "https://matthi.coffee" | ||
LABEL org.label-schema.usage "/README.md" | ||
LABEL org.label-schema.schema-version "1.0" | ||
LABEL author="Matthias Winkelmann <[email protected]>" | ||
LABEL coffee.matthi.vcs-url="https://github.com/MatthiasWinkelmann/lighthouse-chromium-alpine-docker" | ||
LABEL coffee.matthi.uri="https://matthi.coffee" | ||
LABEL coffee.matthi.usage="/README.md" | ||
|
||
WORKDIR /lighthouse | ||
|
||
|
@@ -23,6 +22,7 @@ RUN echo "http://dl-2.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories | |
#----------------- | ||
RUN apk -U --no-cache upgrade && \ | ||
apk --no-cache add xvfb\ | ||
openrc\ | ||
dbus-x11\ | ||
libx11\ | ||
xorg-server\ | ||
|
@@ -46,6 +46,7 @@ ENV GEOMETRY "$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" | |
RUN echo $TZ > /etc/timezone | ||
|
||
ADD lighthouse-chromium-xvfb.sh . | ||
ADD test.sh . | ||
RUN npm --global install yarn && yarn global add lighthouse | ||
RUN mkdir output | ||
|
||
|
@@ -62,5 +63,8 @@ RUN rm -rf /var/lib/apt/lists/* \ | |
/usr/lib/node_modules/npm/html \ | ||
/usr/lib/node_modules/npm/scripts | ||
|
||
|
||
# Alpine's grep is a BusyBox binary which doesn't provide | ||
# the -R (recursive, following symlinks) switch. | ||
#ADD grep ./grep | ||
# RUN alias grep=/lighthouse/grep | ||
ENTRYPOINT ["/lighthouse/lighthouse-chromium-xvfb.sh"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eval $(echo "/bin/grep $@" | sed -e "s/\-ER /\-Er /") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sut: | ||
build: . | ||
command: /lighthouse/test.sh |
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,5 @@ | ||
{ | ||
"dependencies": { | ||
"lighthouse": "^1.6.0" | ||
} | ||
} |
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,4 @@ | ||
#!/bin/sh | ||
|
||
/bin/sh -c "./lighthouse-chromium-xvfb.sh --output-path=/tmp/test-report.html https://matthi.coffee" | ||
grep -q "Best Practices" /tmp/test-report* |
Oops, something went wrong.