Skip to content

Commit

Permalink
ci: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Apr 7, 2024
1 parent c187f15 commit bcb69a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
9 changes: 2 additions & 7 deletions bin/gen-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/sh

set -x
set -e
set -ex

cd "$(dirname "$0")/.."

docker-compose exec wordpress sh -c "\
cd /var/www/html/wp-content/plugins/two-factor-provider-webauthn && \
phpcov merge coverage-report $*
"
exec docker compose exec -w /var/www/html/wp-content/plugins/two-factor-provider-webauthn wordpress phpcov merge coverage-report "$@"
7 changes: 3 additions & 4 deletions bin/reset-database.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/bin/sh

set -x
set -e
set -ex

cd "$(dirname "$0")/.."

docker-compose exec -T wordpress rm -rf /var/www/html/wp-content/mu-plugins
docker-compose run --rm cli sh -c '\
docker compose exec -T wordpress rm -rf /var/www/html/wp-content/mu-plugins
docker compose run --rm cli sh -c '\
wp db reset --yes && \
wp core install --url="https://localhost:8443" --title="Test Site" --admin_user=admin --admin_password=password [email protected] --skip-email && \
wp rewrite structure "/%postname%/" && \
Expand Down
9 changes: 4 additions & 5 deletions bin/run-dev-env.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/bin/sh

set -x
set -e
set -ex

cd "$(dirname "$0")/.."
docker-compose up -d --build
while ! docker-compose run --rm cli wp db check; do
docker compose up -d --build
while ! docker compose run --rm cli wp db check; do
sleep 1;
done

mkdir -p -m 0777 coverage-report
"$(dirname "$0")/reset-database.sh"

docker-compose exec -T wordpress cp -aR /var/www/mu-plugins /var/www/html/wp-content/
docker compose exec -T wordpress cp -aR /var/www/mu-plugins /var/www/html/wp-content/

0 comments on commit bcb69a7

Please sign in to comment.