Skip to content

Commit

Permalink
Add makefile and ci github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
duboiss committed Oct 11, 2021
1 parent 08dd583 commit e767077
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e767077

Please sign in to comment.