-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.07 KB
/
compliance.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
name: Compliance
on:
pull_request:
branches:
- 'main'
jobs:
pylint-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
path: enki
fetch-depth: 0
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
- name: Install python dependencies
working-directory: enki
run: |
pip install -r requirements_pylint.txt
- name: Running pylint
working-directory: enki
run: |
export PYTHONPATH="${PYTHONPATH}:$(pwd)/tahu/python/core/"
py_files=$(find . -maxdepth 1 -type f -name "*.py")
if [ ! -z "${py_files}" ]; then
echo "Running pylint on:"
for f in $(echo $py_files); do
echo -e "\t- ${f}"
done
pylint --rcfile ./.pylintrc ${py_files}
else
echo "No python file to check"
fi