Merge pull request #1172 from taufek/tj-chrome-for-dusk

Install Dependencies to Run Dusk Tests
This commit is contained in:
Mahmoud Zalt 2017-10-03 11:43:49 +03:00 committed by GitHub
commit a2edf57e3b
6 changed files with 93 additions and 0 deletions

View File

@ -40,6 +40,7 @@ services:
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}

View File

@ -53,6 +53,7 @@ WORKSPACE_INSTALL_PYTHON=false
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
WORKSPACE_INSTALL_IMAGEMAGICK=false
WORKSPACE_INSTALL_TERRAFORM=false
WORKSPACE_INSTALL_DUSK_DEPS=false
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_NODE_VERSION=stable

View File

@ -525,6 +525,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
&& rm terraform_0.10.6_linux_amd64.zip \
;fi
#####################################
# Dusk Dependencies:
#####################################
USER root
ARG INSTALL_DUSK_DEPS=false
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
# Install required packages
add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& apt-get -y install zip wget unzip xdg-utils \
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
xfonts-base xfonts-scalable x11-apps \
# Install Google Chrome
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& apt-get -y -f install \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& rm google-chrome-stable_current_amd64.deb \
# Install Chrome Driver
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip \
&& mv chromedriver /usr/local/bin/ \
&& rm chromedriver_linux64.zip \
;fi
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -618,6 +618,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
&& rm terraform_0.10.6_linux_amd64.zip \
;fi
#####################################
# Dusk Dependencies:
#####################################
USER root
ARG INSTALL_DUSK_DEPS=false
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
# Install required packages
add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& apt-get -y install zip wget unzip xdg-utils \
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
xfonts-base xfonts-scalable x11-apps \
# Install Google Chrome
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& apt-get -y -f install \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& rm google-chrome-stable_current_amd64.deb \
# Install Chrome Driver
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip \
&& mv chromedriver /usr/local/bin/ \
&& rm chromedriver_linux64.zip \
;fi
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -624,6 +624,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
&& rm terraform_0.10.6_linux_amd64.zip \
;fi
#####################################
# Dusk Dependencies:
#####################################
USER root
ARG INSTALL_DUSK_DEPS=false
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
# Install required packages
add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& apt-get -y install zip wget unzip xdg-utils \
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
xfonts-base xfonts-scalable x11-apps \
# Install Google Chrome
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& apt-get -y -f install \
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
&& rm google-chrome-stable_current_amd64.deb \
# Install Chrome Driver
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip \
&& mv chromedriver /usr/local/bin/ \
&& rm chromedriver_linux64.zip \
;fi
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -69,6 +69,7 @@ alias migrate="php artisan migrate"
alias refresh="php artisan migrate:refresh"
alias rollback="php artisan migrate:rollback"
alias seed="php artisan:seed"
alias serve="php artisan serve --quiet &"
alias phpunit="./vendor/bin/phpunit"
alias pu="phpunit"
@ -88,6 +89,9 @@ alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $CO
alias run="npm run"
alias tree="xtree"
# Xvfb
alias xvfb="Xvfb -ac :0 -screen 0 1024x768x16 &"
# requires installation of 'https://www.npmjs.com/package/npms-cli'
alias npms="npms search"
# requires installation of 'https://www.npmjs.com/package/package-menu-cli'