xref: /plugin/bpmnio/.github/workflows/lint.yml (revision 9ff8d41c7727ff9fa896ee8f49e170f6b8272716)
1name: Lint & Test
2
3on:
4  push:
5    branches: [main]
6  pull_request:
7    branches: [main]
8
9permissions:
10  contents: read
11
12jobs:
13  php-lint:
14    name: PHP Lint & Static Analysis
15    runs-on: ubuntu-latest
16    strategy:
17      matrix:
18        php-version: ['8.1', '8.2', '8.3']
19    steps:
20      - uses: actions/checkout@v4
21
22      - name: Setup PHP
23        uses: shivammathur/setup-php@v2
24        with:
25          php-version: ${{ matrix.php-version }}
26          tools: composer
27
28      - name: Install Composer dependencies
29        run: composer install --no-interaction --prefer-dist
30
31      - name: Run PHP_CodeSniffer
32        run: .composer-vendor/bin/phpcs
33
34      - name: Run PHPStan
35        if: matrix.php-version == '8.3'
36        run: .composer-vendor/bin/phpstan analyse --no-progress
37
38  js-lint:
39    name: JavaScript Lint
40    runs-on: ubuntu-latest
41    steps:
42      - uses: actions/checkout@v4
43
44      - name: Setup Node.js
45        uses: actions/setup-node@v4
46        with:
47          node-version: '24'
48
49      - name: Install npm dependencies
50        run: npm ci
51
52      - name: Run ESLint
53        run: npx eslint script.js script/
54
55  css-lint:
56    name: LESS/CSS Lint
57    runs-on: ubuntu-latest
58    steps:
59      - uses: actions/checkout@v4
60
61      - name: Setup Node.js
62        uses: actions/setup-node@v4
63        with:
64          node-version: '24'
65
66      - name: Install npm dependencies
67        run: npm ci
68
69      - name: Run Stylelint
70        run: npx stylelint "css/**/*.less" "*.less"
71