Skip to content

Commit b971c01

Browse files
committed
Restore Makefile
The Makefile was removed assuming a Phpakefile or composer would be used. However, it doesn't seem good to make the project depend on itself. Also, composer scripts have their own limitations, e.g. `docker compose exec main sh` doesn't work correctly.
1 parent f56244f commit b971c01

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

.github/workflows/validation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
- name: Prepare
1313
run: composer install
1414
- name: Lint
15-
run: composer lint
15+
run: make lint
1616
- name: Test
17-
run: composer test
17+
run: make test
1818
- name: Coverage
19-
run: cat .coverage/text
19+
run: make coverage-text

Makefile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY: ssh
2+
ssh:
3+
docker compose exec main sh
4+
5+
6+
.PHONY: lint
7+
lint:
8+
composer exec phpcs
9+
10+
11+
.PHONY: test
12+
test:
13+
XDEBUG_MODE=coverage composer exec phpunit
14+
15+
16+
.PHONY: coverage-text
17+
coverage-text:
18+
cat .coverage/text
19+
20+
21+
.PHONY: coverage-html
22+
coverage-html:
23+
open .coverage/html/dashboard.html

composer.json

-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,5 @@
3131
"phpunit/phpunit": "^9.5",
3232
"drupal/coder": "^8.3",
3333
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1"
34-
},
35-
"scripts": {
36-
"lint": "composer exec phpcs",
37-
"test": "XDEBUG_MODE=coverage composer exec phpunit"
3834
}
3935
}

0 commit comments

Comments
 (0)