-
Notifications
You must be signed in to change notification settings - Fork 121
61 lines (52 loc) · 1.49 KB
/
kubespider-style.yaml
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
# Copyright 2022 Kubespider
# SPDX-License-Identifier: Apache-2.0
name: Kubespider style check
on:
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install typing-extensions
pip install -r requirements.txt
cd downloaders
for downloader in $(ls)
do
cd ${downloader}
pip install -r requirements.txt
cd ..
done
- name: Analysing the code with pylint
run: |
ROOT=$(pwd)
pylint $(git ls-files '*.py' | grep -v "downloaders/") --max-line-length=240
skip_downloaders=(tiktok-dlp)
cd downloaders
for downloader in $(ls)
do
if [[ ${skip_downloaders[@]} =~ ${downloader} ]]; then
continue
fi
cd ${downloader}
pylint $(git ls-files '*.py') --max-line-length=240 --rcfile=${ROOT}/.pylintrc
cd ..
done
- name: MD link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: '.mdlintrc'
folder-path: './'