Skip to content

Commit

Permalink
chore: debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeelaudibert committed Feb 25, 2025
1 parent 7d59e5c commit 037d456
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/storybook-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,17 @@ jobs:
name: failure-screenshots-${{ matrix.browser }}-${{ matrix.shard }}
path: frontend/__snapshots__/__failures__/

- name: Configure git diff log
run: git config --global --add safe.directory '*'

- name: Debug diff log
run: git diff

- name: Count and optimize updated snapshots
id: diff
# Skip on forks
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
git config --global --add safe.directory '*' # Calm git down about file ownership
git diff --name-status frontend/__snapshots__/ # For debugging
ADDED=$(git diff --name-status frontend/__snapshots__/ | grep '^A' | wc -l)
MODIFIED=$(git diff --name-status frontend/__snapshots__/ | grep '^M' | wc -l)
DELETED=$(git diff --name-status frontend/__snapshots__/ | grep '^D' | wc -l)
Expand Down Expand Up @@ -226,6 +230,11 @@ jobs:
fi
fi
echo "Snapshot changes:"
echo "Added: $ADDED"
echo "Modified: $MODIFIED"
echo "Deleted: $DELETED"
echo "Total: $TOTAL"
echo "${{ matrix.browser }}-${{ matrix.shard }}-added=$ADDED" >> $GITHUB_OUTPUT
echo "${{ matrix.browser }}-${{ matrix.shard }}-modified=$MODIFIED" >> $GITHUB_OUTPUT
echo "${{ matrix.browser }}-${{ matrix.shard }}-deleted=$DELETED" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 037d456

Please sign in to comment.