-
Notifications
You must be signed in to change notification settings - Fork 5
32 lines (30 loc) · 950 Bytes
/
Copy pathpr-check-python.yml
File metadata and controls
32 lines (30 loc) · 950 Bytes
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
name: Scan Python Code
on:
pull_request:
paths:
- 'utils/**/*.py'
- 'attestation/**/*.py'
- 'tests/**/*.py'
workflow_dispatch:
jobs:
codescan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get install -y libvirt-dev python3-bpfcc aspell
pip3 install --upgrade pip
pip3 install pylint
for f in $(find -type f -name "requirements.txt"); do
pip3 install -r $f
done
- name: Analyzing the python code
run: |
set -ex
export PYTHONPATH=$PWD/utils/pycloudstack:$PWD/utils/ovmfkeyenroll:$PWD/attestation/pytdxmeasure:/lib/python3/dist-packages/
find . -path ./build -prune -o -name *.py -print0 | xargs -n 1 -0 python3 -m pylint