diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index 8738dfc..40ac80f 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -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: ' @ git+https://github.com//.git'" + exit 1 + fi - name: Compare requirements run: |