Skip to content

Instantly share code, notes, and snippets.

@OliverVicente
Created December 2, 2024 00:28
Show Gist options
  • Select an option

  • Save OliverVicente/4106b394a6eda1f334457733037e4676 to your computer and use it in GitHub Desktop.

Select an option

Save OliverVicente/4106b394a6eda1f334457733037e4676 to your computer and use it in GitHub Desktop.
name: Test UI
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
concurrency: test-ui-${{ github.ref }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install Git LFS
run: |
sudo apt-get install git-lfs
git lfs install
- name: Pull LFS files
run: git lfs pull
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Run screenshot tests
run: ./gradlew :app:validateDebugScreenshotTest
- name: Upload screenshot test report
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshot-test-report
path: app/build/reports/screenshotTest/
permissions:
contents: read
pull-requests: read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment