Skip to content

Commit

Permalink
Merge pull request #282 from benbalter/integration-test
Browse files Browse the repository at this point in the history
Integration test
  • Loading branch information
benbalter authored Jan 27, 2022
2 parents ca63099 + bddc411 commit 59bc2fd
Show file tree
Hide file tree
Showing 343 changed files with 671 additions and 56,403 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Integration test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
integration-test:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker compose
uses: isbang/[email protected]
with:
compose-file: './docker-compose.yml'

- name: Wait for DB to initialize
run: |
while ! docker-compose run --rm --user 33:33 wpcli wp db check; do
echo "Waiting for DB to initialize..."
sleep 1
done
echo "DB is ready"
- name: Setup WP
run: |
docker-compose run --rm --user 33:33 wpcli wp core install --url=http://localhost:8088 --title=WordPress --admin_user=admin [email protected]
- name: Activate plugin
run:
docker-compose run --rm --user 33:33 wpcli wp plugin activate jekyll-exporter

- name: Export
run: |
docker-compose run --rm --user 33:33 wpcli wp jekyll-export > export.zip
- name: Unzip
run: |
unzip export.zip -d export
- name: Verify export
run: |
cat export/sample-page.md | grep "title: 'Sample Page'"
34 changes: 21 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.1'
services:

wordpress:
image: wordpress
image: wordpress:latest
restart: always
ports:
- 8088:80
Expand All @@ -12,9 +12,28 @@ services:
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
WORDPRESS_DEBUG: 1
depends_on:
- db
volumes:
- wordpress:/var/www/html
- $PWD:/var/www/html/wp-content/plugins/jekyll-exporter
- ${PWD}/:/var/www/html/wp-content/plugins/jekyll-exporter

wpcli:
image: "wordpress:cli"
restart: always
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
WORDPRESS_DEBUG: 1
depends_on:
- wordpress
- db
volumes:
- wordpress:/var/www/html
- ${PWD}/:/var/www/html/wp-content/plugins/jekyll-exporter

db:
image: mysql:5.7
Expand All @@ -27,17 +46,6 @@ services:
volumes:
- db:/var/lib/mysql

phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- db:db
ports:
- 8089:80
environment:
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_ROOT_PASSWORD: '1'

volumes:
wordpress:
db:
7 changes: 7 additions & 0 deletions script/vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

rm -rf vendor
rm -rf composer.lock
composer install --no-dev
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit85c237256145ae68b71a77045d81d88a::getLoader();
return ComposerAutoloaderInit9e4054bdc3eb8528ad953976d300e206::getLoader();
590 changes: 0 additions & 590 deletions vendor/composer/autoload_classmap.php

Large diffs are not rendered by default.

16 changes: 1 addition & 15 deletions vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@
$baseDir = dirname($vendorDir);

return array(
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'3937806105cc8e221b8fa8db5b70d2f2' => $vendorDir . '/wp-cli/mustangostang-spyc/includes/functions.php',
'be01b9b16925dcb22165c40b46681ac6' => $vendorDir . '/wp-cli/php-cli-tools/lib/cli/cli.php',
'7d3b315c4f303f2fc14aca642a738e50' => $vendorDir . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
);
4 changes: 0 additions & 4 deletions vendor/composer/autoload_namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@
$baseDir = dirname($vendorDir);

return array(
'cli' => array($vendorDir . '/wp-cli/php-cli-tools/lib'),
'WP_CLI\\' => array($vendorDir . '/wp-cli/wp-cli/php'),
'Requests' => array($vendorDir . '/rmccue/requests/library'),
'Mustache' => array($vendorDir . '/mustache/mustache/src'),
);
28 changes: 0 additions & 28 deletions vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,7 @@
$baseDir = dirname($vendorDir);

return array(
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'),
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'PhpCoveralls\\' => array($vendorDir . '/php-coveralls/php-coveralls/src'),
'Mustangostang\\' => array($vendorDir . '/wp-cli/mustangostang-spyc/src'),
'League\\HTMLToMarkdown\\' => array($vendorDir . '/league/html-to-markdown/src'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'),
);
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit85c237256145ae68b71a77045d81d88a
class ComposerAutoloaderInit9e4054bdc3eb8528ad953976d300e206
{
private static $loader;

Expand All @@ -22,15 +22,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit85c237256145ae68b71a77045d81d88a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit9e4054bdc3eb8528ad953976d300e206', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit85c237256145ae68b71a77045d81d88a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit9e4054bdc3eb8528ad953976d300e206', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInit85c237256145ae68b71a77045d81d88a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit9e4054bdc3eb8528ad953976d300e206::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand All @@ -51,12 +51,12 @@ public static function getLoader()
$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit85c237256145ae68b71a77045d81d88a::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit9e4054bdc3eb8528ad953976d300e206::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire85c237256145ae68b71a77045d81d88a($fileIdentifier, $file);
composerRequire9e4054bdc3eb8528ad953976d300e206($fileIdentifier, $file);
}

return $loader;
Expand All @@ -68,7 +68,7 @@ public static function getLoader()
* @param string $file
* @return void
*/
function composerRequire85c237256145ae68b71a77045d81d88a($fileIdentifier, $file)
function composerRequire9e4054bdc3eb8528ad953976d300e206($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
Loading

0 comments on commit 59bc2fd

Please sign in to comment.