forked from cc-api/cc-trusted-vmsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.03 KB
/
pylint.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
name: Python Code Scan
on:
push:
branches:
- main
paths:
- 'src/**/*.py'
pull_request:
paths:
- 'src/**/*.py'
workflow_dispatch:
jobs:
codescan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Analyze python code
run: |
set -ex
sudo su -c 'source setupenv.sh && \
python3 -m pip install --upgrade pip && \
python3 -m pip install pylint pydocstyle && \
for f in $(find -type f -name "requirements.txt" -not -path "./venv/*"); do
python3 -m pip install -r $f;
done && \
python_files=$(find ./ -name "*.py" -not -path "./venv/*" -print) && \
if [[ -n "$python_files" ]]; then
echo "$python_files" | xargs -n 1 python3 -m pylint --rcfile=.github/pylintrc
#echo "$python_files" | xargs -n 1 python3 -m pydocstyle --convention=google
else
echo "No python files found."
fi'