-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (27 loc) · 951 Bytes
/
Makefile
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
PROJECT_NAME = logging-sdk-php
.PHONY: build test clean test
build:
$(if $(PHP_VERSION),,$(error PHP_VERSION make variable needs to be set))
docker buildx build --build-arg=PHP_VERSION=$(PHP_VERSION) -t $(PROJECT_NAME):$(PHP_VERSION) .
lint: build
docker run --rm $(PROJECT_NAME):$(PHP_VERSION) bash -c 'vendor/bin/phpcs --standard=phpcs.xml.dist --warning-severity=0 -p src/ test/'
test: build lint
docker run --rm $(PROJECT_NAME):$(PHP_VERSION) bash -c './project_tests.sh'
test-7.1:
@$(MAKE) PHP_VERSION=7.1 test
test-7.2:
@$(MAKE) PHP_VERSION=7.2 test
test-7.3:
@$(MAKE) PHP_VERSION=7.3 test
test-7.4:
@$(MAKE) PHP_VERSION=7.4 test
test-8.0:
@$(MAKE) PHP_VERSION=8.0 test
test-8.1:
@$(MAKE) PHP_VERSION=8.1 test
test-8.2:
@$(MAKE) PHP_VERSION=8.2 test
test-8.3:
@$(MAKE) PHP_VERSION=8.3 test
test-all: test-7.1 test-7.2 test-7.3 test-7.4 test-8.0 test-8.1 test-8.2 test-8.3
test-all-supported: test-7.1 test-7.2 test-7.3 test-7.4