-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP - Unit Testing w/ Docker Containers
- Loading branch information
Showing
10 changed files
with
130 additions
and
81 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
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
.devcontainer/local-features/welcome-message/devcontainer-feature.json
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,8 @@ | ||
{ | ||
"id": "welcome-message", | ||
"name": "Install the First Start Welcome Message", | ||
"install": { | ||
"app": "", | ||
"file": "install.sh" | ||
} | ||
} |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
# Copy the welcome message | ||
if [ ! -f /usr/local/etc/vscode-dev-containers/first-run-notice.txt ]; then | ||
echo "Installing First Run Notice..." | ||
echo -e "👋 Welcome to \"OpenID Connect for WP Development\" in Dev Containers!\n\n🛠️ Your environment is fully setup with all the required software.\n\n🚀 To get started, wait for the \"postCreateCommand\" to finish setting things up, then open the portforwarded URL and append '/wp/wp-admin'. Login to the WordPress Dashboard using \`admin/password\` for the credentials.\n" | sudo tee /usr/local/etc/vscode-dev-containers/first-run-notice.txt | ||
fi | ||
|
||
echo "Done!" |
8 changes: 8 additions & 0 deletions
8
.devcontainer/local-features/wp-cli/devcontainer-feature.json
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,8 @@ | ||
{ | ||
"id": "wp-cli", | ||
"name": "Install the WP-CLI", | ||
"install": { | ||
"app": "", | ||
"file": "install.sh" | ||
} | ||
} |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install the WP-CLI. | ||
if [ ! -f /usr/local/bin/wp ]; then | ||
echo "Installing WP-CLI..." | ||
sudo curl -sS -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | ||
sudo chmod +x /usr/local/bin/wp | ||
fi | ||
|
||
echo "Done!" |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This is the Compose file for command-line services. | ||
# Anything that doesn't need to be run as part of the main `docker-compose up' | ||
# command should reside in here and be invoked by a helper script. | ||
version: "3.7" | ||
|
||
services: | ||
app: | ||
image: wordpressdevelop/php:8.0-fpm | ||
depends_on: | ||
- db | ||
working_dir: /workspaces/openid-connect-generic | ||
environment: &env | ||
WORDPRESS_DB_HOST: db | ||
WORDPRESS_DB_NAME: wordpress | ||
WORDPRESS_DB_USER: wordpress | ||
WORDPRESS_DB_PASSWORD: wordpress | ||
WORDPRESS_TEST_DB_NAME: wordpress_test | ||
volumes: | ||
- .:/workspaces/openid-connect-generic:cached | ||
- ./tools/local-env:/app:cached | ||
- ./tools/php/php-cli.ini:/usr/local/etc/php/php-cli.ini:ro,cached | ||
- .:/app/wp-content/plugins/daggerhart-openid-connect-generic:ro,cached | ||
- ~/.composer:/root/.composer:cached | ||
- ~/.npm:/root/.npm:cached | ||
networks: | ||
- ci-oidcwp-net | ||
|
||
db: | ||
image: mariadb | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
MYSQL_DATABASE: wordpress | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_USER: wordpress | ||
MYSQL_PASSWORD: wordpress | ||
volumes: | ||
- db:/var/lib/mysql | ||
- ./tests/db-wordpress_test.sql:/docker-entrypoint-initdb.d/db-wordpress_test.sql | ||
networks: | ||
- ci-oidcwp-net | ||
|
||
volumes: | ||
db: | ||
|
||
networks: | ||
ci-oidcwp-net: | ||
|