Fix pip_check (#68421)

This commit is contained in:
Marc Mueller 2022-03-20 16:29:50 +01:00 committed by GitHub
parent 972afc5cea
commit 3b798ee14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -128,6 +128,7 @@ other: &other
requirements: &requirements requirements: &requirements
- .github/workflows/** - .github/workflows/**
- homeassistant/package_constraints.txt - homeassistant/package_constraints.txt
- script/pip_check
- requirements*.txt - requirements*.txt
- setup.cfg - setup.cfg

View File

@ -686,7 +686,7 @@ jobs:
pip-check: pip-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: needs.changes.outputs.requirements == 'true' if: needs.changes.outputs.requirements == 'true' || github.event.inputs.full == 'true'
needs: needs:
- changes - changes
- prepare-tests - prepare-tests

View File

@ -3,7 +3,7 @@ PIP_CACHE=$1
# Number of existing dependency conflicts # Number of existing dependency conflicts
# Update if a PR resolve one! # Update if a PR resolve one!
DEPENDENCY_CONFLICTS=4 DEPENDENCY_CONFLICTS=7
PIP_CHECK=$(pip check --cache-dir=$PIP_CACHE) PIP_CHECK=$(pip check --cache-dir=$PIP_CACHE)
LINE_COUNT=$(echo "$PIP_CHECK" | wc -l) LINE_COUNT=$(echo "$PIP_CHECK" | wc -l)
@ -14,6 +14,7 @@ then
echo "------" echo "------"
echo "Requirements change added another dependency conflict." echo "Requirements change added another dependency conflict."
echo "Make sure to check the 'pip check' output above!" echo "Make sure to check the 'pip check' output above!"
echo "Expected $DEPENDENCY_CONFLICTS conflicts, got $LINE_COUNT."
exit 1 exit 1
elif [[ $((LINE_COUNT)) -lt $DEPENDENCY_CONFLICTS ]] elif [[ $((LINE_COUNT)) -lt $DEPENDENCY_CONFLICTS ]]
then then