Skip to content

Commit

Permalink
Fix ECS, incl. new GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
GenieTim committed Mar 5, 2021
1 parent c69196e commit 42d27da
Show file tree
Hide file tree
Showing 209 changed files with 1,988 additions and 1,050 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/.github export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/rector.php export-ignore
/ecs.php export-ignore
30 changes: 30 additions & 0 deletions .github/workflows/code_style_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Style Check

on:
pull_request:
push:
branches:
- master

jobs:
code_style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none # disable xdebug, pcov
- run: composer install --no-progress
# fix code style, automatically
- run: composer fix-cs
# push changes back
# note that this might not work with PRs from forks:
# https://github.com/stefanzweifel/git-auto-commit-action/issues/25
- uses: stefanzweifel/[email protected]
with:
commit_message: Automatic Fix of Code Style
branch: ${{ github.head_ref }}

# check if some unfixable code style issues remain
- run: composer check-cs
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
"name": "bernhardwebstudio/pipefy-php-sdk",
"extra": [],
"description": "An SDK for the PHP GraphQL API",
"scripts": {
"check-cs": "./vendor/bin/ecs check",
"fix-cs": "./vendor/bin/ecs check --fix"
},
"keywords": ["GraphQL", "Pipefy"],
"require-dev": {
"overblog/graphql-php-generator": "^0.12.6",
"symfony/expression-language": "^5.2",
"rector/rector": "^0.9.31",
"symplify/easy-coding-standard": "*",
"phpstan/phpstan": "*",
"gmostafa/php-graphql-oqm": "^1.3"
},
"require": {
Expand Down
Loading

0 comments on commit 42d27da

Please sign in to comment.