Skip to content

Commit

Permalink
use set -x in run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuber21 committed Jul 20, 2023
1 parent 84a4476 commit ef402cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- id: changedfiles
name: Get list of changed .py files
run: |
set -x
echo "CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .py$ | xargs)" >> "$GITHUB_OUTPUT"
if [[ $(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .py$ | wc -l) -eq 0 ]]; then
echo "HAS_CHANGES=false" >> "$GITHUB_OUTPUT"
Expand All @@ -26,6 +27,7 @@ jobs:
- name: Run isort on changed files
if: steps.changedfiles.outputs.HAS_CHANGES == 'true'
run: |
set -x
python -m pip install isort
isort --check ${{ steps.changedfiles.outputs.CHANGED_FILES }}
- uses: psf/black@stable
Expand Down

0 comments on commit ef402cd

Please sign in to comment.