Skip to content

Commit 30d4c0b

Browse files
committed
Add linting actions
1 parent 0d95484 commit 30d4c0b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Remove developer files from exports
55
tests export-ignore
66
.gitattributes export-ignore
7+
.github export-ignore
78
.gitignore export-ignore
89
.php_cs export-ignore
910
.travis.yml export-ignore

.github/workflows/main.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v2
20-
- name: Setup PHP, with composer and extensions
20+
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
2323
php-version: ${{ matrix.php-versions }}
@@ -37,3 +37,18 @@ jobs:
3737
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3838
- name: Test with phpunit
3939
run: vendor/bin/phpunit
40+
lint:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v2
45+
- name: Setup PHP
46+
uses: shivammathur/setup-php@v2
47+
with:
48+
php-version: '7.4'
49+
coverage: none
50+
tools: php-cs-fixer, phpcs
51+
- name: Run PHP Coding Standards Fixer
52+
run: php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no
53+
- name: Run PHP_CodeSniffer
54+
run: phpcs -p --standard=PSR12 src tests

0 commit comments

Comments
 (0)