-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathranch.sh
executable file
·32 lines (25 loc) · 1.36 KB
/
ranch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Condiment script for running tests on our local
# This differs from pantheon or a CI tool running tests,
# as the environment settings in the config files will have to be tweaked.
#
# Before running this script make sure docker is up and running, and the site
# is doing its site thing.
# Get ready to test
chromedriver --port=4444 &
# Lint our code
# Check against coder
# Requires drupal/coder and phpcodesniffer to be global installed.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md web/modules/custom/ > tests/output/coder.txt
# Run behat tests
./vendor/bin/behat -c tests/behat-docker.yml > tests/output/behat.txt
# Run our phpunit tests
./vendor/bin/phpunit -v --testsuite=unit -c `pwd`/tests/phpunit.xml > tests/output/phpunit-unit.txt
./vendor/bin/phpunit -v --testsuite=kernel -c `pwd`/tests/phpunit.xml > tests/output/phpunit-kernel.txt
./vendor/bin/phpunit -v --testsuite=functional -c `pwd`/tests/phpunit.xml > tests/output/phpunit-functional.txt
./vendor/bin/phpunit -v --testsuite=functional-javascript -c `pwd`/tests/phpunit.xml > tests/output/phpunit-functional-javascript.txt
# Additional checks
# Axe-crawler requires a tld, so set localhost.tld to 127.0.0.1 in your /etc/hosts
# axe-crawler --configFile tests/.axe-crawler.json "localhost.tld:8000/"
# kill chromedriver
killall -9 chromedriver