Merge pull request #1399 from jooola/feat/rename_legacy_ci_jobs
Improve legacy Makefile
This commit is contained in:
commit
3be3a53e3b
|
@ -44,16 +44,15 @@ jobs:
|
||||||
- run: make all
|
- run: make all
|
||||||
working-directory: tools
|
working-directory: tools
|
||||||
|
|
||||||
php-cs-fixer:
|
lint-legacy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: shivammathur/setup-php@v2
|
- uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: 7.4
|
php-version: 7.4
|
||||||
- name: Run php-cs-fixer
|
- name: Lint
|
||||||
run: |
|
run: make lint
|
||||||
make php-cs-fixer
|
|
||||||
working-directory: legacy
|
working-directory: legacy
|
||||||
|
|
||||||
test-legacy:
|
test-legacy:
|
||||||
|
|
|
@ -1,19 +1,27 @@
|
||||||
.PHONY: build php-cs-fixer
|
|
||||||
|
|
||||||
SHELL = bash
|
SHELL = bash
|
||||||
|
|
||||||
vendor:
|
all: vendor
|
||||||
composer install --no-progress --no-interaction
|
|
||||||
|
|
||||||
|
PHP-CS-FIXER = tools/vendor/bin/php-cs-fixer
|
||||||
|
$(PHP-CS-FIXER):
|
||||||
|
mkdir -p tools
|
||||||
|
composer require --working-dir=tools friendsofphp/php-cs-fixer
|
||||||
|
|
||||||
|
vendor:
|
||||||
|
composer install --no-progress --no-interaction $(COMPOSER_ARGS)
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test: vendor
|
test: vendor
|
||||||
cd tests && ../vendor/bin/phpunit
|
cd tests && ../vendor/bin/phpunit
|
||||||
|
|
||||||
|
.PHONY: format
|
||||||
|
format: $(PHP-CS-FIXER)
|
||||||
|
$(PHP-CS-FIXER) fix
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
|
lint: $(PHP-CS-FIXER)
|
||||||
|
$(PHP-CS-FIXER) fix --dry-run --diff
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
composer install --no-progress --no-interaction --no-dev
|
COMPOSER_ARGS=--no-dev $(MAKE)
|
||||||
|
|
||||||
tools/php-cs-fixer:
|
|
||||||
mkdir -p tools/php-cs-fixer
|
|
||||||
composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
|
|
||||||
|
|
||||||
php-cs-fixer: tools/php-cs-fixer
|
|
||||||
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix
|
|
||||||
|
|
Loading…
Reference in New Issue