Skip to content

Commit

Permalink
Update wp-tests to 8.0.1 and introduce phpgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelthq committed Dec 16, 2019
1 parent 3daade5 commit 19726a2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
7 changes: 6 additions & 1 deletion circleci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ RUN \
sudo docker-php-ext-enable exif

# Install tools for Wordpress
ADD wp-tests-8.0.0.tar.gz /
ADD wp-tests-8.0.1.tar.gz /
RUN \
sudo mv /wp-tests /opt && \
sudo chown root:root /opt/wp-tests -R && \
curl --insecure -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x wp-cli.phar && \
sudo mv wp-cli.phar /usr/local/bin/wp

# Install GO (required for phpgrep)
RUN sudo curl -O https://dl.google.com/go/go1.13.linux-amd64.tar.gz \
&& sudo tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
RUN sudo /usr/local/go/bin/go get -v github.com/quasilyte/phpgrep/cmd/phpgrep && sudo chmod +x /root/go/bin/phpgrep && sudo mv /root/go/bin/phpgrep /usr/local/bin/phpgrep

# Download and configure Wordpress
RUN wp core download --path=/var/www/html --allow-root

Expand Down
Binary file removed circleci/wp-tests-8.0.0.tar.gz
Binary file not shown.
Binary file added circleci/wp-tests-8.0.1.tar.gz
Binary file not shown.
13 changes: 9 additions & 4 deletions php7.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get update \
&& add-apt-repository ppa:ondrej/php \
&& apt-get update

RUN apt-get install -y mysql-server libmysqlclient-dev --no-install-recommends
RUN apt-get update && apt-get install -y mysql-server libmysqlclient-dev --no-install-recommends

RUN apt-get install -y php7.3 php7.3-common php7.3-dev php7.3-dom php7.3-xdebug php7.3-zip php7.3-cli php7.3-mbstring php7.3-pdo php7.3-fpm php7.3-curl php7.3-mysql php7.3-gd php7.3-readline

Expand All @@ -29,10 +29,15 @@ RUN sed -i "/upload_max_filesize = .*/c\upload_max_filesize = 200M" /etc/php/7.3
&& sed -i "/memory_limit = .*/c\memory_limit = 256M" /etc/php/7.3/cli/php.ini \
&& sed -i "s/zend_extension/;zend_extension/g" /etc/php/7.3/mods-available/xdebug.ini


RUN tar -zxvf /opt/wp-tests-8.0.1.tar.gz -C /opt
RUN chown root:root /opt/wp-tests -R

# Install GO (required for phpgrep)
RUN curl -O https://dl.google.com/go/go1.13.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
RUN export PATH=$PATH:/usr/local/go/bin
RUN /usr/local/go/bin/go get -v github.com/quasilyte/phpgrep/cmd/phpgrep && sudo chmod +x /root/go/bin/phpgrep && sudo /root/go/bin/phpgrep /usr/local/bin/phpgrep

WORKDIR /var/www/html

# Configure mysql sock
Expand All @@ -52,7 +57,7 @@ RUN usermod -d /var/lib/mysql mysql && find /var/lib/mysql -exec touch {} \; &&
RUN find /var/lib/mysql -exec touch {} \; && /etc/init.d/mysql start \
&& wp core download --path=/var/www/html --allow-root \
&& wp core config --path=/var/www/html --dbhost=127.0.0.1 --dbname=test --dbuser=wpuser --dbpass=wpuser --allow-root \
&& wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 [email protected] --path=/var/www/html --allow-root
&& wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 [email protected] --path=/var/www/html --allow-root --skip-email

# Install node and chrome
RUN \
Expand All @@ -74,4 +79,4 @@ RUN \
export npm_config_unsafe_perm=true

# Start the mysql
ENTRYPOINT /etc/init.d/mysql start && bash
ENTRYPOINT find /var/lib/mysql -type f -exec touch {} \; && service mysql start && bash

0 comments on commit 19726a2

Please sign in to comment.