Merge pull request #1399 from jooola/feat/rename_legacy_ci_jobs

Improve legacy Makefile
This commit is contained in:
Kyle Robbertze 2021-10-15 05:44:36 +00:00 committed by GitHub
commit 3be3a53e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 16 deletions

View File

@ -44,16 +44,15 @@ jobs:
- run: make all
working-directory: tools
php-cs-fixer:
lint-legacy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Run php-cs-fixer
run: |
make php-cs-fixer
- name: Lint
run: make lint
working-directory: legacy
test-legacy:

View File

@ -1,19 +1,27 @@
.PHONY: build php-cs-fixer
SHELL = bash
vendor:
composer install --no-progress --no-interaction
all: vendor
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
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:
composer install --no-progress --no-interaction --no-dev
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
COMPOSER_ARGS=--no-dev $(MAKE)