-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a local feedback loop to make code changes
- Loading branch information
Showing
2 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
PROJECT_NAME = api-sdk-php | ||
.PHONY: build test clean test | ||
.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: build lint | ||
test-ci: 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-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-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-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters