forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 8
72 lines (68 loc) · 2.19 KB
/
QA.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
# SPDX-License-Identifier: GPL-2.0-or-later
name: Quality assurance
on: [pull_request]
jobs:
checkpatch:
name: checkpatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 150
- name: Run checkpatch review
uses: webispy/checkpatch-action@master
env:
CHECKPATCH_COMMAND: checkpatch.pl --no-tree --strict
yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 150
- name: Install yamllint
run: |
sudo apt-get -qq update > /dev/null
sudo apt-get -qq install python3-pip > /dev/null
pip install yamllint
- id: files
uses: jitterbit/get-changed-files@v1
- name: Run yamllint review
run: |
YAMLS="${{ steps.files.outputs.added_modified }}"
touch out.txt
for item in ${YAMLS}; do
if [[ "${item}" != **/*yaml ]]; then
continue
fi
yamllint -d "{rules: {line-length: {level: warning, max: 100}}}" \
-f github ${item}
yamllint -d "{rules: {line-length: {level: warning, max: 100}}}" \
-f standard ${item} >> out.txt
done
cat out.txt
dt-doc-validate:
name: dt-doc-validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 150
- name: Install dt-schema
run: |
sudo apt-get -qq update > /dev/null
sudo apt-get -qq install python3-pip > /dev/null
pip install git+https://github.com/devicetree-org/dt-schema.git@master
- id: files
uses: jitterbit/get-changed-files@v1
- name: Run dt-doc-validate review
run: |
YAMLS="${{ steps.files.outputs.added_modified }}"
for item in ${YAMLS}; do
if [[ "${item}" != **/*yaml ]]; then
continue
fi
# remove warning about URL
dt-doc-validate "${item}" #2>&1 | grep -v \
#"\$id: relative path/filename doesn't match actual path or filename\|expected:.*yaml#"
done