forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 13
67 lines (56 loc) · 1.45 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
name: Styling
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
php_styling:
runs-on: ubuntu-20.04
name: PHP
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- 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-20.04
name: CSS
steps:
- uses: actions/checkout@v2
- name: Install npm package
uses: actions/setup-node@v1
with:
node-version: '12'
- name: npm install
run: |
failTest=false
npm install || failTest=true
if $failTest; then
exit 1
fi
- name: Check CSS Styling
run: |
failTest=false
npx stylelint "**/*.css" || failTest=true
npx stylelint "**/*.scss" || failTest=true
if $failTest; then
exit 1
fi