File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 2626 pip3 install pytest==7.1.2
2727 git config diff.wsErrorHighlight all
2828
29+ - name : Get changed files
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ run : |
33+ if [ "${{ github.event_name }}" == "pull_request" ]; then
34+ files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
35+ elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
36+ files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
37+ fi
38+ echo "$files" >> changed.txt
39+ cat changed.txt
40+ files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ')
41+ echo "CHANGED_FILES=$files" >> $GITHUB_ENV
42+
2943 # This needs to happen before Python and npm execution; it must happen before any extra files are written.
3044 - name : .gitignore checks (gitignore_check.sh)
3145 run : |
3448 - name : Style checks via pre-commit
3549 uses :
pre-commit/[email protected] 3650 with :
37- extra_args : --verbose
51+ extra_args : --verbose --files ${{ env.CHANGED_FILES }}
3852
3953 - name : Python builders checks via pytest
4054 run : |
You can’t perform that action at this time.
0 commit comments