Skip to content

Commit

Permalink
Add qa tooling helper scripts and drop Ant build.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Jan 13, 2025
1 parent fae403d commit d64ee74
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 301 deletions.
301 changes: 0 additions & 301 deletions build.xml

This file was deleted.

11 changes: 11 additions & 0 deletions ci/qa/all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e

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

./ci/qa/phpmd.sh
./ci/qa/phpcs.sh
./ci/qa/docheader.sh
./ci/qa/phpunit.sh
./ci/qa/behat.sh
./ci/qa/lint.sh
29 changes: 29 additions & 0 deletions ci/qa/behat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e

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


CURRENT_ENV="${SYMFONY_ENV:-dev}"

if [ "${CURRENT_ENV}" != "ci" ]
then
echo "The engineblock instance should run in ci mode."
exit 1
fi

echo -e "\nInstalling database fixtures...\n"
./app/console doctrine:schema:drop --force --env=ci
./app/console doctrine:schema:create --env=ci

echo -e "\nPreparing frontend assets\n"
EB_THEME=skeune ./theme/scripts/prepare-test.js > /dev/null

chown -R www-data app/cache/
chmod -R 0777 /tmp/eb-fixtures

echo -e "\nRun the Behat tests\n"
./vendor/bin/behat -c ./tests/behat-ci.yml --suite default -vv --format progress --strict

#echo -e "\nBehat tests (with selenium and headless Chrome)\n"
#./vendor/bin/behat -c ./tests/behat-ci.yml --suite selenium -vv --format progress --strict
7 changes: 7 additions & 0 deletions ci/qa/docheader.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e

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

echo -e "\nDoc header check\n"
./vendor/bin/docheader check src/ tests/ library/ --exclude-dir resources --exclude-dir languages
14 changes: 14 additions & 0 deletions ci/qa/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e

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

echo -e "\nTwig lint\n"
app/console lint:twig theme/

cd theme

echo -e "\nLint frontend assets\n"
yarn lint

cd -
10 changes: 10 additions & 0 deletions ci/qa/phpcs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e

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

echo -e "\nPHP CodeSniffer\n"
./vendor/bin/phpcs --report=full --standard=ci/qa-config/phpcs.xml --warning-severity=0 --extensions=php src

echo -e "\nPHP CodeSniffer (legacy code)\n"
./vendor/bin/phpcs --standard=ci/qa-config/phpcs-legacy.xml --warning-severity=0 --extensions=php -s library
7 changes: 7 additions & 0 deletions ci/qa/phpmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e

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

echo -e "\nPHP Mess Detector\n"
./vendor/bin/phpmd src text ci/qa-config/phpmd.xml --exclude */Tests/*
Loading

0 comments on commit d64ee74

Please sign in to comment.