-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.ahoy.yml
108 lines (92 loc) · 2.81 KB
/
.ahoy.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Ahoy configuration file.
# http://www.ahoycli.com/
---
ahoyapi: v2
commands:
build:
usage: Build or rebuild the project.
cmd: |
ahoy stop > /dev/null 2>&1 || true
ahoy assemble
ahoy start
ahoy provision
assemble:
usage: Assemble a codebase using project code and all required dependencies.
cmd: ./.devtools/assemble.sh
start:
usage: Start development environment.
cmd: ./.devtools/start.sh
stop:
usage: Stop development environment.
cmd: ./.devtools/stop.sh
provision:
usage: Provision application within assembled codebase.
cmd: ./.devtools/provision.sh
drush:
usage: Run Drush command.
cmd: build/vendor/bin/drush -l http://${WEBSERVER_HOST:-localhost}:${WEBSERVER_PORT:-8000} $*
login:
usage: Login to a website.
cmd: ahoy drush uli
lint:
usage: Check coding standards for violations.
cmd: |
pushd "build" >/dev/null || exit 1
vendor/bin/phpcs
vendor/bin/phpstan
vendor/bin/rector --clear-cache --dry-run
vendor/bin/phpmd . text phpmd.xml
vendor/bin/twig-cs-fixer
popd >/dev/null || exit 1
lint-fix:
usage: Fix violations in coding standards.
cmd: |
pushd "build" >/dev/null || exit 1
vendor/bin/rector --clear-cache
vendor/bin/phpcbf
vendor/bin/twig-cs-fixer --no-cache --fix
popd >/dev/null || exit 1
test:
usage: Run tests.
cmd: |
pushd "build" >/dev/null || exit 1
php -d pcov.directory=.. vendor/bin/phpunit
popd >/dev/null || exit 1
test-unit:
usage: Run unit tests.
cmd: |
pushd "build" >/dev/null || exit 1
php -d pcov.directory=.. vendor/bin/phpunit --testsuite unit "$@"
popd >/dev/null || exit 1
test-kernel:
usage: Run kernel tests.
cmd: |
pushd "build" >/dev/null || exit 1
php -d pcov.directory=.. vendor/bin/phpunit --testsuite kernel "$@"
popd >/dev/null || exit 1
test-functional:
usage: Run functional tests.
cmd: |
pushd "build" >/dev/null || exit 1
php -d pcov.directory=.. vendor/bin/phpunit --testsuite functional "$@"
popd >/dev/null || exit 1
reset:
usage: Reset project to the default state.
cmd: |
killall -9 php >/dev/null 2>&1 || true
chmod -Rf 777 build .logs > /dev/null 2>&1 || true
rm -Rf build > /dev/null 2>&1 || true
rm -Rf .logs > /dev/null 2>&1 || true
# Override entrypoint to alter default behaviour of Ahoy.
entrypoint:
- bash
- -c
- -e
- |
extension="$(basename -s .info.yml -- ./*.info.yml)"
export BROWSERTEST_OUTPUT_DIRECTORY="${TMPDIR:-/tmp}"
export SIMPLETEST_BASE_URL=http://${WEBSERVER_HOST:-localhost}:${WEBSERVER_PORT:-8000}
export SIMPLETEST_DB=sqlite://localhost/drupal_test_${extension}.sqlite
bash -e -c "$0" "$@"
- '{{cmd}}'
- '{{name}}'