Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add roborazzi snapshots #231

Merged
merged 7 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
generate
  • Loading branch information
trevor-e committed Nov 20, 2024
commit cfd92a656367147fb411f0f69521e3a2a8ae64ed
43 changes: 42 additions & 1 deletion .github/workflows/android_emerge_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths: [ android/** ]

jobs:
build:
emerge:
runs-on: ubuntu-latest

defaults:
Expand All @@ -30,3 +30,44 @@ jobs:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}

roborazzi:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./android

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: Ruby setup
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.5
bundler-cache: true

- name: Setup gems
run: gem install emerge

- name: Generate Roborazzi snapshots
run: ./gradlew :app:recordRoborazziDebug

- name: Upload snapshots
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
run: |
emerge upload snapshots \
--name "HackerNews Swift-Snapshot-Testing" \
--id "com.emerge.hackernews.roborazzi" \
--repo-name "EmergeTools/hackernews" \
--debug \
app/build/outputs/roborazzi
Loading