Skip to content

Commit

Permalink
add linter to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
beeblebrox3 committed Oct 19, 2023
1 parent 635b31e commit 454eb67
Show file tree
Hide file tree
Showing 6 changed files with 4,120 additions and 15 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: xdebug

- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Lint
run: composer run lint
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
vendor/
index.php
/nbproject
/.idea
/report
/.settings
/.buildpath
/.project
composer.lock
.idea/
coverage/
.phpunit.cache/
.phpunit.result.cache
.phpunit.cache
/coverage
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"phpcs": "phpcs --extensions=php --standard=PSR12 --tab-width=4 --colors src/ tests/",
"phpmd": "phpmd src/ text cleancode,codesize,controversial,unusedcode,naming,design",
"pint": "pint src/ tests/",
"phpstan": "phpstan analyse src/ tests/ --level 9",
"psalm": "psalm",
"test": "phpunit",
"test:coverage": "XDEBUG_MODE=coverage phpunit --coverage-html coverage/html --coverage-clover coverage/clover.xml"
"test:coverage": "XDEBUG_MODE=coverage phpunit --coverage-html coverage/html --coverage-clover coverage/clover.xml",
"lint": "composer phpcs && composer phpmd && composer psalm"
},
"require": {
"php": ">=8.1.0"
Expand All @@ -25,7 +25,6 @@
"squizlabs/php_codesniffer": "^3.7",
"phpmd/phpmd": "^2.14",
"laravel/pint": "^1.13",
"phpstan/phpstan": "^1.10",
"vimeo/psalm": "^5.15",
"phpunit/phpunit": "^10.4"
},
Expand Down
Loading

0 comments on commit 454eb67

Please sign in to comment.