Skip to content

Commit

Permalink
Merge pull request #415 from ONLYOFFICE/feature/action-linter
Browse files Browse the repository at this point in the history
ci: linter actions
  • Loading branch information
LinneyS authored Mar 22, 2023
2 parents 62db166 + 9e160f8 commit 2afca07
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint

on:
push:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
php-lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ "8.0", "8.1", "8.2" ]
name: php-lint
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint
run: |
cd ${{ github.workspace }}
find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l
26 changes: 26 additions & 0 deletions .github/workflows/lint-phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on:
push:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
name: php-cs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none
tools: composer, cs2pr, phpcs
- name: Run phpcs
run: |
phpcs --standard=PSR2 --extensions=php,module,inc,install --ignore=node_modules,bower_components,vendor,3rdparty --warning-severity=0 ./

0 comments on commit 2afca07

Please sign in to comment.