File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,22 +74,24 @@ jobs:
7474
7575 poetry remove cohere
7676 poetry add ../../../cohere-python
77+ cd ../langchain-cohere/libs/cohere
7778
7879 echo "Current cohere installation: $(poetry show cohere)"
7980 make test
8081 make integration_test
8182 echo "tests passed"
8283
83- # Only fail if there are changes other than poetry.lock and pyproject.toml
84- CHANGED=$(git status --porcelain | grep -vE 'poetry.lock|pyproject.toml')
85- if [ -z "$CHANGED" ]; then
86- echo "No relevant changes detected."
87- exit 0
88- else
89- echo "Unexpected changes detected:"
90- echo "$CHANGED"
91- exit 1
92- fi
84+ # reset poetry changes
85+ git checkout -- poetry.lock pyproject.toml
86+
87+ set -eu
88+
89+ STATUS="$(git status)"
90+ echo "$STATUS"
91+
92+ # grep will exit non-zero if the target message isn't found,
93+ # and `set -e` above will cause the step to fail.
94+ echo "$STATUS" | grep 'nothing to commit, working tree clean'
9395 env :
9496 COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
9597
You can’t perform that action at this time.
0 commit comments