From 575aff68b05255e518840ccde866c92720e5b4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 21 Sep 2024 11:17:11 +0200 Subject: [PATCH] some cleanup --- .phpcs.xml.dist => .phpcs.xml | 0 .woodpecker/test.yml | 19 ------------- Dockerfile | 27 +++++++++++++++++++ .../add_your_event_plugin.md | 0 4 files changed, 27 insertions(+), 19 deletions(-) rename .phpcs.xml.dist => .phpcs.xml (100%) delete mode 100644 .woodpecker/test.yml create mode 100644 Dockerfile rename add_your_event_plugin.md => docs/add_your_event_plugin.md (100%) diff --git a/.phpcs.xml.dist b/.phpcs.xml similarity index 100% rename from .phpcs.xml.dist rename to .phpcs.xml diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml deleted file mode 100644 index 7e61820..0000000 --- a/.woodpecker/test.yml +++ /dev/null @@ -1,19 +0,0 @@ -when: - - event: push - branch: woodpecker - -steps: - - name: build - image: php:8.3 - environment: - WP_TESTS_PHPUNIT_POLYFILLS_PATH: vendor/yoast/phpunit-polyfills - commands: - - apt -y update - - apt -y install libonig-dev - - docker-php-ext-install mbstring mysqli pdo_mysql intl gd zip bz2 - - docker-php-ext-enable mbstring mysqli pdo_mysql intl gd zip bz2 - - composer require --dev yoast/phpunit-polyfills:"^3.0" - - composer install - - bash bin/install-wp-tests.sh wordpress_tests root mysql mysql 6.6 true - - phpunit --configuration phpunit.xml.dist - diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c4464d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM php:8.1.29-alpine + +RUN mkdir /app + +WORKDIR /app + +# Install Git, NPM & needed libraries +RUN apk update \ + && apk add bash git nodejs npm gettext subversion mysql mysql-client zip \ + && rm -f /var/cache/apk/* + +RUN docker-php-ext-install mysqli + +# Install Composer +RUN EXPECTED_CHECKSUM=$(curl -s https://composer.github.io/installer.sig) \ + && curl https://getcomposer.org/installer -o composer-setup.php \ + && ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" \ + && if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then >&2 echo 'ERROR: Invalid installer checksum'; rm composer-setup.php; exit 1; fi \ + && php composer-setup.php --quiet \ + && php -r "unlink('composer-setup.php');" \ + && mv composer.phar /usr/local/bin/composer + +RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ + chmod +x wp-cli.phar && \ + mv wp-cli.phar /usr/local/bin/wp + +RUN chmod +x -R ./ diff --git a/add_your_event_plugin.md b/docs/add_your_event_plugin.md similarity index 100% rename from add_your_event_plugin.md rename to docs/add_your_event_plugin.md