-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from mitchmac/main
Sync main to master
- Loading branch information
Showing
291 changed files
with
9,959 additions
and
9,998 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: e2e Tests | ||
on: [push, pull_request] | ||
jobs: | ||
jest: | ||
name: e2e tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- run: ./run.sh | ||
working-directory: ./test |
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 |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
"description": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"serverlesswp": "^0.1.1" | ||
"serverlesswp": "^0.1.2" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM public.ecr.aws/lambda/nodejs:18 | ||
|
||
COPY package.json ${LAMBDA_TASK_ROOT}/ | ||
RUN npm install --omit=optional --omit=dev | ||
|
||
COPY api/ ${LAMBDA_TASK_ROOT}/api/ | ||
COPY util/ ${LAMBDA_TASK_ROOT}/util/ | ||
COPY wp/ ${LAMBDA_TASK_ROOT}/wp/ | ||
COPY temp/sqlite-database-integration ${LAMBDA_TASK_ROOT}/wp/wp-content/plugins/sqlite-database-integration/ | ||
COPY /temp/sqlite-database-integration/db.copy ${LAMBDA_TASK_ROOT}/wp/wp-content/db.php | ||
COPY test/installer.php ${LAMBDA_TASK_ROOT}/wp/ | ||
|
||
RUN sed -i 's#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#/tmp/wp/wp-content/plugins/sqlite-database-integration#' ${LAMBDA_TASK_ROOT}/wp/wp-content/db.php | ||
|
||
RUN echo "define('FQDBDIR', '/tmp/db' );" >> ${LAMBDA_TASK_ROOT}/wp/wp-config.php | ||
|
||
CMD [ "api/index.handler" ] |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
cd .. | ||
mkdir temp | ||
cd temp | ||
git clone https://github.com/WordPress/sqlite-database-integration.git | ||
cd .. | ||
docker build -t serverlesswp-test -f test/Dockerfile . | ||
rm -rf temp |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
// Do not use this on a live site! For testing purposes only! | ||
|
||
define('WP_INSTALLING', true); | ||
|
||
require_once dirname(__DIR__) . '/wp/wp-load.php'; | ||
require_once ABSPATH . 'wp-admin/includes/upgrade.php'; | ||
require_once ABSPATH . 'wp-admin/includes/translation-install.php'; | ||
require_once ABSPATH . WPINC . '/class-wpdb.php'; | ||
|
||
if (!is_blog_installed()) { | ||
$weblog_title = 'ServerlessWP Site'; | ||
$user_name = 'admin'; | ||
$admin_email = '[email protected]'; | ||
$public = TRUE; | ||
|
||
$result = wp_install($weblog_title, $user_name, $admin_email, $public); | ||
update_user_meta( 1, 'default_password_nag', false ); | ||
} else { | ||
echo 'WordPress is already installed.'; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
./build-test.sh | ||
|
||
docker run -p 9000:8080 -d -e FQDBDIR='/tmp/db' --name serverlesswp-test serverlesswp-test | ||
|
||
curl -s -o /dev/null -w "%{http_code}" -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"path":"/installer.php"}' | ||
|
||
curl -s -o /dev/null -w "%{http_code}" -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"path":"/"}' | ||
|
||
docker stop serverlesswp-test | ||
docker rm serverlesswp-test |
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
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
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
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
2 changes: 1 addition & 1 deletion
2
wp/wp-content/plugins/amazon-s3-and-cloudfront/assets/css/settings.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.