Skip to content

chore(screenshots): add Git LFS tracking for screenshot ground truths#31077

Draft
gnbm wants to merge 1 commit intomainfrom
FW-7038_lfs
Draft

chore(screenshots): add Git LFS tracking for screenshot ground truths#31077
gnbm wants to merge 1 commit intomainfrom
FW-7038_lfs

Conversation

@gnbm
Copy link
Copy Markdown
Contributor

@gnbm gnbm commented Apr 13, 2026

Track Playwright screenshot PNGs with Git LFS to prevent GitHub's large file push rejection (GH001). Uses going-forward-only strategy so existing clones and forks are unaffected.

Issue number: resolves #


What is the current behavior?

  • Screenshot ground truth PNG files are stored as regular Git blobs. When adding new screenshot tests (e.g. chip dark, high contrast, high contrast dark), GitHub rejects the push with: GH001: Large files detected. You may want to try Git Large File Storage
  • The .git directory has grown to ~1.6 GB due to 19,000+ historical PNG blobs across 6,700+ committed screenshots.

What is the new behavior?

  • Screenshot ground truth PNGs (core/src/components/**/*-snapshots/*.png) are tracked with Git LFS via .gitattributes
  • Existing 6,751 committed PNGs are converted to LFS pointer files (~130 bytes each) — actual image data lives in GitHub LFS storage
  • CI screenshot jobs (test-core-screenshot and update-reference-screenshots) use lfs: true on actions/checkout to download real PNG content before running Playwright comparisons
  • Non-screenshot CI jobs are unaffected and do not download LFS objects (bandwidth optimization)
  • Documentation updated with Git LFS setup instructions for contributors

Does this introduce a breaking change?

  • Yes
  • No

Other information

Strategy: Going-forward only (no history rewrite). Existing clones and forks continue to work. Contributors need git lfs install (one-time setup) to work with screenshot files.

Files changed:

  • .gitattributes — LFS tracking rule for snapshot PNGs
  • .github/workflows/build.ymllfs: true on test-core-screenshot checkout
  • .github/workflows/update-screenshots.ymllfs: true on both screenshot job checkouts
  • docs/core/testing/usage-instructions.md — new "Git LFS Setup" section
  • docs/CONTRIBUTING.md — Git LFS as prerequisite step in Setup
  • ~6,751 PNG files — converted to LFS pointer files

Track Playwright screenshot PNGs with Git LFS to prevent GitHub's
large file push rejection (GH001). Uses going-forward-only strategy
so existing clones and forks are unaffected.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Apr 13, 2026 2:14pm

Request Review

@github-actions github-actions bot added the package: core @ionic/core package label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant