Skip to content

Commit

Permalink
improve pipreqs
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Jul 1, 2024
1 parent c2eadcc commit 5bd64d1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,17 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipreqs
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run pipreqs
run: pipreqs --savepath pipreqs.txt
run: |
pipreqs --savepath pipreqs.txt taca 2>&1 | tee pipreqs_output.log
if grep -q 'WARNING: Package .* does not exist or network problems' pipreqs_output.log; then
missing_packages=$(grep 'WARNING: Package .* does not exist or network problems' pipreqs_output.log | sed -E 's/.*Package "(.*)" does not exist.*/\1/')
echo "ERROR: Add unresolved packages to requirements. Missing package(s): $missing_packages. Example: '<pkg> @ git+https://github.com/<author>/<repo>.git'"
exit 1
fi
- name: Compare requirements
run: |
Expand Down

0 comments on commit 5bd64d1

Please sign in to comment.