-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 925 Bytes
/
Makefile
File metadata and controls
47 lines (35 loc) · 925 Bytes
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
.PHONY: build up down test test-coverage phpstan rector fix-cs install shell logs clean
# Build the Docker image
build:
docker compose build
# Start the services
up:
docker compose up -d
# Stop the services
down:
docker compose down
# Install dependencies
install:
docker compose run --rm php composer install
# Run all tests
test: up
docker compose exec php vendor/bin/phpunit
# Run unit tests with coverage
test-coverage: up
docker compose exec -e XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-html var/coverage/
phpstan: up
docker compose exec php vendor/bin/phpstan
rector: up
docker compose exec php vendor/bin/rector
fix-cs: up
docker compose exec php vendor/bin/php-cs-fixer fix -v
# Open a shell in the PHP container
shell:
docker compose exec php bash
# View logs
logs:
docker compose logs -f php
# Clean up containers and volumes
clean:
docker compose down -v
docker compose rm -f