Skip to content

Add git overrides for integration testing from emerge-android #529

Add git overrides for integration testing from emerge-android

Add git overrides for integration testing from emerge-android #529

name: Generate Android Snapshots
on:
push:
branches: [main]
pull_request:
branches: [main]
paths: [android/**]
jobs:
emerge:
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: Setup Gradle build action
uses: gradle/actions/setup-gradle@v4
- name: Emerge snapshots
run: ./gradlew :app:emergeUploadSnapshotBundleDebug
env:
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: Setup Gradle build action
uses: gradle/actions/setup-gradle@v4
- 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 Roborazzi" \
--id "com.emerge.hackernews.roborazzi" \
--repo-name "EmergeTools/hackernews" \
--debug \
--client-library roborazzi \
--project-root .