This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 548
111 lines (100 loc) · 2.68 KB
/
lint.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Lint
on:
push:
branches:
- master
- pai-**
pull_request:
branches:
- master
- pai-**
jobs:
docs:
name: Lint docs
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install markdown==2.6.11
- name: Lint
run: |
python src/utilities/doc_checker.py .
spelling:
name: Spelling check
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install dependencies
run: |
curl -L https://git.io/misspell | sudo bash -s -- -b /bin
- name: Check spelling
run: |
rm -rf ./src/watchdog/GOPATH/src/github.com/microsoft/watchdog/vendor/
misspell -error .
pylint-deployment:
name: pylint of deployment scripts
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Python 3.5
uses: actions/setup-python@v2
with:
python-version: 3.5
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r contrib/kubespray/script/requirements.txt
python -m pip install pylint
- name: Lint
run: |
pylint contrib/kubespray/script --rcfile=contrib/kubespray/script/pylintrc
pylint-alert-manager:
name: pylint of alert-manager
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r src/alert-manager/src/cluster-utilization/requirements.txt
python -m pip install pylint
- name: Lint
run: |
pylint src/alert-manager/src/cluster-utilization/ --rcfile=src/alert-manager/src/cluster-utilization/pylintrc
swagger-validate:
name: Validate swagger
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [10]
os: [ubuntu-18.04]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install swagger-cli
run: |
npm install -g @apidevtools/swagger-cli
- name: validate
run: |
swagger-cli validate src/rest-server/docs/swagger.yaml