-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
59 lines (48 loc) · 1.61 KB
/
Copy pathTaskfile.yml
File metadata and controls
59 lines (48 loc) · 1.61 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
version: '3'
# The task vocabulary mirrors what CMS gateway teams actually run:
# same names on every repo so moving between plugins costs nothing.
tasks:
lint:
desc: Run PHPCS (PSR12 + ForgeStandard architecture sniffs)
cmds:
- vendor/bin/phpcs
lint:fix:
desc: Auto-fix what PHPCBF can fix
cmds:
- vendor/bin/phpcbf
php-static-analysis:
desc: Run PHPStan at level max
cmds:
- vendor/bin/phpstan analyse --memory-limit=1G --no-progress
php-compatibility:
desc: Check the code stays compatible with the whole supported PHP range
cmds:
- vendor/bin/phpcs -p --standard=PHPCompatibility --runtime-set testVersion 8.2-8.5 src adapters conformance tools
tests:
desc: Run the unit suite + the conformance suite for every adapter
cmds:
- vendor/bin/phpunit
tests:coverage:
desc: Tests with coverage + the ratchet (needs a coverage driver, pcov or xdebug)
cmds:
- php -d pcov.enabled=1 vendor/bin/phpunit --coverage-xml .coverage
- php tools/phpunit-threshold.php
spec:validate:
desc: Validate every spec under spec/examples
cmds:
- php bin/forge validate-spec spec/examples/generic-bnpl.yaml
semgrep:
desc: Run the semgrep rules (needs semgrep on the PATH)
cmds:
- semgrep scan --config semgrep/rules --error src adapters conformance tools
pre-commit:install:
desc: Install the pre-commit hooks
cmds:
- pre-commit install
check:
desc: Everything CI runs, locally, in order
cmds:
- task: lint
- task: php-static-analysis
- task: tests
- task: spec:validate