Skip to content

Commit

Permalink
Use Git Large File Storage for snapshot images (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
calda committed Dec 1, 2022
1 parent 2dc50ca commit 114a0f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
with:
lfs: 'true'
- uses: ./.github/actions/setup
- name: Test Package
run: bundle exec rake test:package
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ We always appreciate contributions from the community. To make changes to the pr
- unit tests and snapshot tests (for iOS, must be run on an iPhone 8 simulator)
- an Example iOS app that lets you browse and test over 100 sample animations included in the repo

To reduce the size of the repository, snapshot images are stored using [Git Large File Storage](https://git-lfs.github.com/). Before running the snapshot tests, you'll need to install Git LFS:

```bash
$ brew install git-lfs
$ git lfs install
```

All pull requests with new features or bug fixes that affect how animations render should include snapshot test cases that validate the included changes.
- To add a new sample animation to the snapshot testing suite, you can add the `.json` file to `Tests/Samples`. Re-run the snapshot tests to generate the new snapshot image files.
- To update existing snapshots after making changes, you can set `isRecording = true` in `SnapshotTests.swift` and then re-run the snapshot tests.
Expand Down

0 comments on commit 114a0f8

Please sign in to comment.