Rename dependency cc-trusted-api to evidence-api #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Code Scan | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'sdk/python3/cima/**.py' | |
pull_request: | |
paths: | |
- 'sdk/python3/cima/**.py' | |
workflow_dispatch: | |
jobs: | |
scan_python: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v3 | |
- name: Setup Python action | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install pylint | |
python3 -m pip install -r ./sdk/python3/requirements.txt | |
python3 -m pip install -e ./sdk/python3/ | |
- name: Analyze python code | |
run: | | |
set -ex | |
export PYTHONPATH=$PWD/cima:$PYTHONPATH | |
python_files=$(find . -path ./sdk/python3/tests -prune -o -name "*.py" -print) | |
if [[ -n "$python_files" ]]; then | |
echo "$python_files" | xargs -n 1 python3 -m pylint --rcfile=.github/pylintrc | |
else | |
echo "No Python files found." | |
fi |