forked from sendgrid/sendgrid-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1000 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
33
34
35
36
37
.PHONY: clean install ci-install test test-integ test-docker bundle
clean:
@rm -rf vendor composer.lock sendgrid-php.zip
php_version = `php -v | head -n 1 | cut -d " " -f 2`
install: clean
ifdef GIT_HUB_TOKEN
composer config -g github-oauth.github.com $(GIT_HUB_TOKEN)
endif
composer install
ifeq ($(dependencies), lowest)
composer update --prefer-lowest --prefer-stable -n
endif
ci-install: clean
composer install --no-dev
test:
vendor/bin/phpunit test/unit --filter test*
vendor/bin/phpcs lib/*/*
vendor/bin/phpstan analyse --memory-limit 1G --no-progress --level 1 lib test
test-integ: test
vendor/bin/phpunit test --filter test*
version ?= latest
test-docker:
curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/HEAD/prism/prism.sh -o prism.sh
dependencies=lowest version=$(version) bash ./prism.sh
dependencies=highest version=$(version) bash ./prism.sh
bundle: ci-install
zip -r sendgrid-php.zip . -x \*.git\* \*composer.json\* \*scripts\* \*test\* \*prism\*