Skip to content

Commit d64ee74

Browse files
committed
Add qa tooling helper scripts and drop Ant build.xml
1 parent fae403d commit d64ee74

File tree

8 files changed

+101
-301
lines changed

8 files changed

+101
-301
lines changed

build.xml

Lines changed: 0 additions & 301 deletions
This file was deleted.

ci/qa/all.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
./ci/qa/phpmd.sh
7+
./ci/qa/phpcs.sh
8+
./ci/qa/docheader.sh
9+
./ci/qa/phpunit.sh
10+
./ci/qa/behat.sh
11+
./ci/qa/lint.sh

ci/qa/behat.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
7+
CURRENT_ENV="${SYMFONY_ENV:-dev}"
8+
9+
if [ "${CURRENT_ENV}" != "ci" ]
10+
then
11+
echo "The engineblock instance should run in ci mode."
12+
exit 1
13+
fi
14+
15+
echo -e "\nInstalling database fixtures...\n"
16+
./app/console doctrine:schema:drop --force --env=ci
17+
./app/console doctrine:schema:create --env=ci
18+
19+
echo -e "\nPreparing frontend assets\n"
20+
EB_THEME=skeune ./theme/scripts/prepare-test.js > /dev/null
21+
22+
chown -R www-data app/cache/
23+
chmod -R 0777 /tmp/eb-fixtures
24+
25+
echo -e "\nRun the Behat tests\n"
26+
./vendor/bin/behat -c ./tests/behat-ci.yml --suite default -vv --format progress --strict
27+
28+
#echo -e "\nBehat tests (with selenium and headless Chrome)\n"
29+
#./vendor/bin/behat -c ./tests/behat-ci.yml --suite selenium -vv --format progress --strict

ci/qa/docheader.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
echo -e "\nDoc header check\n"
7+
./vendor/bin/docheader check src/ tests/ library/ --exclude-dir resources --exclude-dir languages

ci/qa/lint.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
echo -e "\nTwig lint\n"
7+
app/console lint:twig theme/
8+
9+
cd theme
10+
11+
echo -e "\nLint frontend assets\n"
12+
yarn lint
13+
14+
cd -

ci/qa/phpcs.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
echo -e "\nPHP CodeSniffer\n"
7+
./vendor/bin/phpcs --report=full --standard=ci/qa-config/phpcs.xml --warning-severity=0 --extensions=php src
8+
9+
echo -e "\nPHP CodeSniffer (legacy code)\n"
10+
./vendor/bin/phpcs --standard=ci/qa-config/phpcs-legacy.xml --warning-severity=0 --extensions=php -s library

ci/qa/phpmd.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd $(dirname $0)/../../
5+
6+
echo -e "\nPHP Mess Detector\n"
7+
./vendor/bin/phpmd src text ci/qa-config/phpmd.xml --exclude */Tests/*

0 commit comments

Comments
 (0)