Repository navigation
Expand file tree
/
Copy pathgrumphp.yml
More file actions
99 lines (98 loc) · 3.51 KB
/
Copy pathgrumphp.yml
File metadata and controls
99 lines (98 loc) · 3.51 KB
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
#
# ddev composer run grumphp run
#
grumphp:
git_hook_variables:
# Using grunp inside ddev.
# @see https://www.patrickvanefferen.nl/blog/configuring-grumphp-ddev
# requires Reinit ddev exec grumphp git:init
EXEC_GRUMPHP_COMMAND: ddev exec -d "/var/www/html/wp-content/plugins/open-source-event-calendar"
parameters:
# 120s is too short for the integration_tests (Selenium) task, which
# can take ~3 minutes on its own.
process_timeout: 600
tasks:
composer: ~
# gherkin: ~
# git_commit_message: ~
# phpcpd:
# exclude:
# - lib
# - tests
# - vendor
# phplint: ~
# phpmd:
# ruleset: ['codesize', 'design', 'naming', 'unusedcode']
# exclude:
# - tests
# - vendor
# Doc: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcs.md
phpcs:
standard: ['./phpcs.xml']
# warning_severity: 0
phpunit:
config_file: './phpunit.xml'
# Run regardless of which files changed - see TESTING.md.
always_execute: true
# Runs the Mocha/Selenium integration_tests suite.
# Requires the ddev/ddev-selenium-standalone-chrome add-on (or a reachable
# Selenium server) and constants-local.php - see TESTING.md.
integration_tests:
triggered_by: ['php']
scripts:
- ["-c", "cd integration_tests && SELENIUM_REMOTE_URL=http://selenium-chrome:4444/wd/hub npm run test"]
metadata:
task: shell
# Release-readiness checks - all pure checks, none of them write to
# the working tree. See TESTING.md / .claude/plans for design notes.
release_check:
triggered_by: ['php']
scripts:
- ["-c", "wp osec prepare_release"]
metadata:
task: shell
make_readme:
triggered_by: ['php']
scripts:
- ["-c", "wp osec make_readme --check"]
metadata:
task: shell
hooks_and_filters:
triggered_by: ['php']
scripts:
- ["-c", "cd hookster_markdown && node build.js check"]
metadata:
task: shell
# WordPress plugin-check gate. `wp plugin check` always exits 0 even
# with errors, so bin/plugin-check.sh parses its output, keeps only
# findings in files the release actually ships and fails on ERROR.
# Needs jq and yq.
plugin_check:
triggered_by: ['php']
scripts:
- ["-c", "bin/plugin-check.sh"]
metadata:
task: shell
testsuites:
git_pre_commit:
tasks:
- composer
- phpcs
- phpunit
# Everything from the TESTING.md checklist in one go.
# Run explicitly: vendor/bin/grumphp run --testsuite=all_tests
all_tests:
tasks:
- composer
- phpcs
- phpunit
- plugin_check
- integration_tests
# Release-readiness checks. Run after all_tests:
# vendor/bin/grumphp run --testsuite=all_tests && vendor/bin/grumphp run --testsuite=prepare_release
prepare_release:
tasks:
- release_check
- make_readme
- hooks_and_filters
- plugin_check