Skip to content

Commit 75615de

Browse files
committed
Added codeception build.
1 parent faebbea commit 75615de

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plugins/hwp-previews/bin/run-codeception.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,20 @@ run_tests() {
7373
wp maintenance-mode deactivate --allow-root
7474
fi
7575

76+
7677
# Suites is the comma separated list of suites/tests to run.
7778
echo "Running Test Suite $suites"
7879
cd "$PROJECT_DIR"
80+
81+
# IMPORTANT: Build Codeception classes before running tests
82+
echo "Building Codeception test classes"
83+
vendor/bin/codecept build -c codeception.dist.yml
84+
85+
if [ $? -ne 0 ]; then
86+
echo "Error: Codeception build failed"
87+
exit 1
88+
fi
89+
7990
XDEBUG_MODE=coverage vendor/bin/codecept run -c codeception.dist.yml ${suites} ${coverage:-} ${debug:-} --no-exit
8091
if [ $? -ne 0 ]; then
8192
echo "Error: Codeception tests failed with exit code $?"

0 commit comments

Comments
 (0)