mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
20c95aa05e
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...8ade135a41bc03ea155e62e844d188df1ea18608) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
96 lines
4.5 KiB
YAML
96 lines
4.5 KiB
YAML
name: "Screenshot Test"
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master, stable-* ]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: screenshot-test-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
screenshot:
|
|
runs-on: macOS-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
scheme: [ Light ]
|
|
color: [ blue ]
|
|
api-level: [ 27 ]
|
|
steps:
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
|
|
|
|
- name: Gradle cache
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
|
- name: AVD cache
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
|
|
id: avd-cache
|
|
with:
|
|
path: |
|
|
~/.android/avd/*
|
|
~/.android/adb*
|
|
key: avd-${{ matrix.api-level }}
|
|
|
|
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 17
|
|
|
|
- name: create AVD and generate snapshot for caching
|
|
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
force-avd-creation: false
|
|
arch: x86
|
|
sdcard-path-or-size: 100M
|
|
target: google_apis
|
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
|
|
script: echo "Generated AVD snapshot for caching."
|
|
|
|
- name: Configure gradle daemon
|
|
run: |
|
|
mkdir -p $HOME/.gradle
|
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
|
|
echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties
|
|
|
|
- name: Build gplay
|
|
run: ./gradlew assembleGplayDebug
|
|
|
|
- name: Delete old comments
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
if: ${{ always() }}
|
|
run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}}
|
|
|
|
- name: Run screenshot tests
|
|
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
force-avd-creation: false
|
|
arch: x86
|
|
sdcard-path-or-size: 100M
|
|
target: google_apis
|
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
|
|
script: ./gradlew uninstallAll gplayDebugExecuteScreenshotTests -Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }}
|
|
- name: upload failing results
|
|
if: ${{ failure() }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}}
|
|
- name: Archive Espresso results
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
|
if: ${{ always() }}
|
|
with:
|
|
name: Report-${{ matrix.color }}-${{ matrix.scheme }}
|
|
path: app/build/reports
|
|
retention-days: 4
|