Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ASpiteri-BCGov committed Sep 27, 2024
1 parent 1b33db4 commit 9b5a332
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

jobs:
test:
env:
WP_TESTS_DIR: /wordpress-files-tests
WP_CORE_DIR: /wordpress-files
runs-on: ubuntu-latest
services:
mysql:
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:
done
- name: Create Test Environment
run: bin/install-wp-tests.sh wordpress_test root 'rootpassword' 127.0.0.1 latest
run: bin/install-wp-tests.sh wordpress_test root 'rootpassword' localhost latest

- name: Run PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml.dist
4 changes: 2 additions & 2 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ SKIP_DB_CREATE=${6-false}

TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=./wordpress-files
WP_CORE_DIR=./wordpress-files
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress}

download() {
if [ `which curl` ]; then
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
},
"scripts": {
"test-setup":"bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest",
"version-update":"bash update_version.sh",
"production": [
"composer validate",
Expand Down

0 comments on commit 9b5a332

Please sign in to comment.