-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
38 lines (31 loc) · 1.04 KB
/
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
33
34
35
36
37
38
PROJECT_NAME = api-sdk-php
PHP_VERSION = 7.1
.PHONY: build test test-ci clean
vendor:
composer install
test: vendor
./project_tests.sh
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/ scripts/ test/ spec/'
test-ci: build lint
docker run --rm $(PROJECT_NAME):$(PHP_VERSION) bash -c './project_tests.sh'
test-ci-7.1:
@$(MAKE) PHP_VERSION=7.1 test-ci
test-ci-7.2:
@$(MAKE) PHP_VERSION=7.2 test-ci
test-ci-7.3:
@$(MAKE) PHP_VERSION=7.3 test-ci
test-ci-7.4:
@$(MAKE) PHP_VERSION=7.4 test-ci
test-ci-8.0:
@$(MAKE) PHP_VERSION=8.0 test-ci
test-ci-8.1:
@$(MAKE) PHP_VERSION=8.1 test-ci
test-ci-8.2:
@$(MAKE) PHP_VERSION=8.2 test-ci
test-ci-8.3:
@$(MAKE) PHP_VERSION=8.3 test-ci
test-ci-all: test-ci-7.1 test-ci-7.2 test-ci-7.3 test-ci-7.4 test-ci-8.0 test-ci-8.1 test-ci-8.2 test-ci-8.3