Create lint.yml
This commit is contained in:
parent
a8d82c4d03
commit
6fa74fa5d5
2 changed files with 48 additions and 0 deletions
36
.github/workflow/lint.yml
vendored
Normal file
36
.github/workflow/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.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
|
12
composer.json
Normal file
12
composer.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "nextcloud/tasks",
|
||||
"description": "Lint config for nextcloud/tasks",
|
||||
"license": "MIT",
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"classmap-authoritative": true
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue