From e76707776aa094f27dc54d245545af879b6e5901 Mon Sep 17 00:00:00 2001 From: Steven DUBOIS Date: Mon, 11 Oct 2021 18:37:10 +0200 Subject: [PATCH] Add makefile and ci github workflow --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ Makefile | 15 +++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..af7c761 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + pull_request: + push: + branches: + - 'master' + +jobs: + symfony: + name: Symfony + continue-on-error: false + runs-on: 'ubuntu-20.04' + + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + + - name: Install project + uses: php-actions/composer@v6 # https://github.com/marketplace/actions/composer-php-actions + with: + php_version: 8.0 + version: 1 + command: make install + + - name: Check the Symfony console + run: bin/console -V + + - name: Quality tools checks + run: make phpcsfixer-audit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..68d31ea --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.DEFAULT_GOAL := help + +install: + @composer install + +phpcsfixer-audit: vendor ## Run php-cs-fixer audit + @php ./vendor/bin/php-cs-fixer fix --diff --dry-run --no-interaction --ansi --verbose + +phpcsfixer-fix: vendor ## Run php-cs-fixer fix + @php ./vendor/bin/php-cs-fixer fix --verbose + +help: ## List of all commands + @grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' + +.PHONY: install phpcsfixer-audit phpcsfixer-fix help