mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-17 21:12:14 +01:00
Run php linter on github actions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
f43ce8afbd
commit
8863b4fff9
3 changed files with 41 additions and 1 deletions
36
.github/workflows/lint.yml
vendored
Normal file
36
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Lint
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
php-linters:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.0', '7.1', '7.2', '7.3', 7.4]
|
||||
name: php${{ matrix.php-versions }} lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set up php${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@master
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
- name: Lint
|
||||
run: composer run lint
|
||||
|
||||
node-linters:
|
||||
runs-on: ubuntu-latest
|
||||
name: ESLint
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: npm install
|
||||
run: npm ci
|
||||
- name: eslint
|
||||
run: npm run lint
|
||||
env:
|
||||
CI: true
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
tests/clover.xml
|
||||
.idea
|
||||
node_modules/
|
||||
js/
|
||||
*.spec
|
||||
|
|
|
|||
|
|
@ -13,5 +13,8 @@
|
|||
"email": "jus@bitgrid.net"
|
||||
}
|
||||
],
|
||||
"require": {}
|
||||
"require": {},
|
||||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue