spreed/.github/workflows/lint.yml

54 строки
1.3 KiB
YAML

name: Lint
on: [push]
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: "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
style-linter:
runs-on: ubuntu-latest
name: Style lint
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set up Stylelint 11
run: npm i -g stylelint@11.0.0
- name: Style lint
run: $(which stylelint) -f verbose css
eslint:
runs-on: ubuntu-latest
name: ESLint
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: NPM install
run: npm i
- name: ESLint
run: npm run lint
- name: Stylelint for vue files
run: npm run stylelint