-
Notifications
You must be signed in to change notification settings - Fork 4
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
ca89aaf
commit 3f3c6a9
Showing
3 changed files
with
34 additions
and
57 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 |
---|---|---|
|
@@ -5,63 +5,43 @@ WORKDIR /tests | |
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils | ||
RUN apt-get update | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
wget \ | ||
unzip \ | ||
curl \ | ||
npm \ | ||
jq \ | ||
default-jre \ | ||
libxkbcommon0 \ | ||
libpangocairo-1.0 \ | ||
libxdamage1 \ | ||
libgbm1 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get install -y wget && apt install -y unzip | ||
|
||
# At root dir | ||
COPY ./tests/*.bat /tests/ | ||
COPY ./tests/*.js /tests/ | ||
COPY ./tests/*.csv /tests/ | ||
COPY ./tests/*.ext /tests/ | ||
|
||
RUN apt-get update | ||
RUN apt-get install curl -y | ||
RUN apt-get install npm -y | ||
|
||
# npm WARN EBADENGINE package: '[email protected]' with Node 12.x | ||
RUN npm install [email protected] | ||
RUN npm install jquery | ||
RUN npm install jquery-csv | ||
RUN npm install unzipper | ||
# node-fetch v3 errors with require(), needs import | ||
RUN npm install [email protected] | ||
# Needed for "Chrome for Testing" | ||
RUN apt-get -y install jq | ||
RUN apt-get -y install default-jre | ||
RUN apt-get -f install | ||
RUN apt-get update && apt-get install -y libxkbcommon0 libpangocairo-1.0 libxdamage1 libgbm1 | ||
|
||
RUN npm install selenium-webdriver | ||
|
||
#RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt install -y ./google-chrome-stable_current_amd64.deb | ||
# Get Chrome for Testing - Chrome stable version number does not match the Chrome for Testing stable version | ||
RUN CHROME_URL=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.downloads.chrome[] | select(.platform == "linux64") | .url') \ | ||
&& curl -sSLf --retry 3 --output /tmp/chrome-linux64.zip "$CHROME_URL" \ | ||
&& unzip /tmp/chrome-linux64.zip -d /opt \ | ||
&& ln -s /opt/chrome-linux64/chrome /usr/local/bin/chrome \ | ||
&& rm /tmp/chrome-linux64.zip | ||
|
||
# Get Chromedriver for Testing - this is the only supported version going forward | ||
#RUN CHROME_VERSION=$(google-chrome --version | sed -n 's/Google Chrome \([0-9.]*\).*/\1/p; s/[^0-9.]//g') \ | ||
# && wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_VERSION/linux64/chromedriver-linux64.zip \ | ||
# && unzip -o chromedriver-linux64.zip -d /usr/local/bin | ||
RUN CHROMEDRIVER_URL=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url') \ | ||
&& curl -sSLf --retry 3 --output /tmp/chromedriver-linux64.zip "$CHROMEDRIVER_URL" \ | ||
&& unzip -o /tmp/chromedriver-linux64.zip -d /tmp \ | ||
&& rm -rf /tmp/chromedriver-linux64.zip \ | ||
&& mv -f /tmp/chromedriver-linux64/chromedriver "/usr/local/bin/chromedriver" \ | ||
&& chmod +x "/usr/local/bin/chromedriver" | ||
|
||
RUN chmod +x /tests/RunAllTests-Chrome-Linux.bat | ||
RUN sed -i 's/\r//' /tests/RunAllTests-Chrome-Linux.bat | ||
|
||
RUN chmod +x /tests/Cleanup-Docker.bat | ||
RUN sed -i 's/\r//' /tests/Cleanup-Docker.bat | ||
|
||
RUN chmod +x /tests/Buildup-Docker.bat | ||
RUN sed -i 's/\r//' /tests/Buildup-Docker.bat | ||
|
||
|
||
|
||
RUN npm install [email protected] jquery jquery-csv unzipper [email protected] selenium-webdriver | ||
|
||
# Get Chrome for Testing - Chrome stable version | ||
RUN CHROME_URL=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.downloads.chrome[] | select(.platform == "linux64") | .url') && \ | ||
curl -sSLf --retry 3 --output /tmp/chrome-linux64.zip "$CHROME_URL" && \ | ||
unzip /tmp/chrome-linux64.zip -d /opt && \ | ||
ln -s /opt/chrome-linux64/chrome /usr/local/bin/chrome && \ | ||
rm /tmp/chrome-linux64.zip | ||
|
||
# Get Chromedriver for Testing - matching Chrome version | ||
RUN CHROMEDRIVER_URL=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url') && \ | ||
curl -sSLf --retry 3 --output /tmp/chromedriver-linux64.zip "$CHROMEDRIVER_URL" && \ | ||
unzip -o /tmp/chromedriver-linux64.zip -d /tmp && \ | ||
rm -rf /tmp/chromedriver-linux64.zip && \ | ||
mv -f /tmp/chromedriver-linux64/chromedriver "/usr/local/bin/chromedriver" && \ | ||
chmod +x "/usr/local/bin/chromedriver" | ||
|
||
RUN chmod +x /tests/RunAllTests-Chrome-Linux.bat /tests/Cleanup-Docker.bat /tests/Buildup-Docker.bat && \ | ||
sed -i 's/\r//' /tests/*.bat |
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