-
Notifications
You must be signed in to change notification settings - Fork 1.6k
81 lines (63 loc) · 2.33 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
cs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
name: Coding Style
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: mbstring
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Check Coding Style - PHP
run: vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --diff --verbose
- name: Check composer.json format
run: composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock
- name: Check Coding Style - JS
run: |
npm add -D eslint eslint-plugin-import eslint-config-airbnb-base eslint-plugin-unicorn
npx eslint --ext .js .
- name: Plugins - Check composer.json format
run: |
for plugin_dir in plugins/*/; do (
echo "========== $plugin_dir =========="
cd "$plugin_dir"
composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock "$plugin_dir/composer.json"
echo " "
); done
phpstan:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
name: Static Analysis
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: mbstring
tools: composer:v2
coverage: none
- name: Setup composer
run: |
composer require "kolab/net_ldap3:~1.1.1" --no-update
composer require "laravel/dusk:^7.9" --no-update
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run Static Analysis
run: |
rm -r public_html # remove once https://github.com/phpstan/phpstan/issues/10321 is fixed
vendor/bin/phpstan analyse