File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,11 +235,13 @@ jobs:
235235 id : changed-files
236236 run : |
237237 # PRのベースコミットとの差分から対象ファイルを取得(SHA指定で確実に動作)
238- CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR ${{ github.event.pull_request.base.sha }}...${{ github.sha }} -- \
239- 'src/services/**/*.ts' 'src/lib/**/*.ts' | \
240- grep -v '__tests__' | \
241- grep -v '\.test\.ts$' | \
242- grep -v '\.spec\.ts$' || true)
238+ RAW_CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR ${{ github.event.pull_request.base.sha }}...${{ github.sha }} -- \
239+ 'src/services/**/*.ts' 'src/lib/**/*.ts') || {
240+ echo "::error::git diff failed while collecting mutation targets"
241+ exit 1
242+ }
243+ CHANGED_FILES=$(printf '%s\n' "$RAW_CHANGED_FILES" | \
244+ grep -Ev '(__tests__|\.test\.ts$|\.spec\.ts$)' || true)
243245
244246 if [ -z "$CHANGED_FILES" ]; then
245247 echo "No mutation test target files changed"
You can’t perform that action at this time.
0 commit comments