forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 13
96 lines (80 loc) · 1.97 KB
/
styling.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Styling
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
php_styling:
runs-on: ubuntu-22.04
name: PHP
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: Report PHP Version
run: php -v
- name: Install php_codesniffer
run: |
failTest=false
composer global require "squizlabs/php_codesniffer=3.*" || failTest=true
if $failTest; then
exit 1
fi
- name: Check PHP Styling
run: |
failTest=false
$HOME/.composer/vendor/bin/phpcs -p -n --extensions=php,inc --report-width=120 --standard=ci/phpcs.xml --report=full . || failTest=true
if $failTest; then
exit 1
fi
css_styling:
runs-on: ubuntu-22.04
name: CSS
steps:
- uses: actions/checkout@v3
- name: Install npm package
uses: actions/setup-node@v3
with:
node-version: '20'
- name: npm install
run: |
failTest=false
npm install || failTest=true
if $failTest; then
exit 1
fi
- name: Check CSS Styling
run: |
failTest=false
npm run stylelint || failTest=true
if $failTest; then
exit 1
fi
js_linting:
runs-on: ubuntu-22.04
name: JS
steps:
- uses: actions/checkout@v3
- name: Install npm package
uses: actions/setup-node@v3
with:
node-version: '20'
- name: npm install
run: |
failTest=false
npm install || failTest=true
if $failTest; then
exit 1
fi
- name: Check JS Linting
run: |
failTest=false
npm run lint:js || failTest=true
if $failTest; then
exit 1
fi