Run CodeQL analysis on deps if changed
@@ -37,10 +37,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- - name: Install deps
+ - name: Setup python for CodeQL
run: |
python -m pip install --upgrade pip pipenv
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
+ - name: Check Pipfile.lock changed
+ uses: tj-actions/verify-changed-files@v5.5
+ id: changed_files
+ with:
+ files: Pipfile.lock
+ - name: Setup dependencies if they changed
+ if: steps.changed_files.outputs.files_changed == 'true'
+ run: |
+ pipenv lock -r > requirements.txt
+ pip install -r requirements.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
