Skip to content

Commit 87e9f06

Browse files
Enhance CI workflow to ignore changes in poetry.lock and pyproject.toml for clean working tree checks
1 parent 7e5a223 commit 87e9f06

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,15 @@ jobs:
8585
STATUS="$(git status)"
8686
echo "$STATUS"
8787
88-
# grep will exit non-zero if the target message isn't found,
89-
# and `set -e` above will cause the step to fail.
90-
echo "$STATUS" | grep 'nothing to commit, working tree clean'
88+
# Ignore changes to poetry.lock and pyproject.toml when checking for a clean working tree
89+
CHANGED=$(git status --porcelain | grep -vE 'poetry.lock|pyproject.toml')
90+
if [ -z "$CHANGED" ]; then
91+
echo "No relevant changes detected."
92+
else
93+
echo "Unexpected changes detected:"
94+
echo "$CHANGED"
95+
exit 1
96+
fi
9197
env:
9298
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
9399

0 commit comments

Comments
 (0)