Skip to content

Commit

Permalink
- Debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpojer committed Jul 2, 2024
1 parent 2d7af9c commit b4feb24
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,12 @@ jobs:
run: |
# Get the list of changed Python files
CHANGED_FILES_SRC=$(git diff --name-only --diff-filter=AMR ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '.py$')
echo "Changed Python files 0: $CHANGED_FILES"
echo "Changed Python files 1: $CHANGED_FILES_SRC"
CHANGED_FILES=$(echo $CHANGED_FILES_SRC | tr '\n' ',')
echo "Changed Python files 1: $CHANGED_FILES"
CHANGED_FILES=$(echo $CHANGED_FILES_SRC | tr '\r\n' ',')
# Convert list to comma-delimited string
CHANGED_FILES=$(echo "$CHANGED_FILES_SRC" | awk '{printf "%s,", $0} END {print ""}' | sed 's/,$//')
echo "Changed Python files 2: $CHANGED_FILES"
CHANGED_FILES=$(echo $CHANGED_FILES_SRC | tr -s '\r\n' ',')
echo "Changed Python files 3: $CHANGED_FILES"
CHANGED_FILES=$(echo $CHANGED_FILES_SRC | paste -sd "," -)
# print linst of changed file
echo "Changed Python files 4: $CHANGED_FILES"
# Generate coverage report for changed files
# Fail if the coverage for changed files is below threshold
coverage report --include="$CHANGED_FILES" | grep TOTAL | awk '{if ($4 < 80.0) exit 1}'
Expand Down

0 comments on commit b4feb24

Please sign in to comment.