mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
edbf1cad81
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...4723a57e26
)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
92 lines
4.2 KiB
YAML
92 lines
4.2 KiB
YAML
name: "Screenshot Test"
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master, stable-* ]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
screenshot:
|
|
runs-on: macOS-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
scheme: [ Light ]
|
|
color: [ blue ]
|
|
api-level: [ 27 ]
|
|
steps:
|
|
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
|
|
|
|
- name: Gradle cache
|
|
uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # 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@4723a57e26efda3a62cbde1812113b730952852d # v3
|
|
id: avd-cache
|
|
with:
|
|
path: |
|
|
~/.android/avd/*
|
|
~/.android/adb*
|
|
key: avd-${{ matrix.api-level }}
|
|
|
|
- uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 11
|
|
|
|
- name: create AVD and generate snapshot for caching
|
|
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 # 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@50986b1464923454c95e261820bc626f38490ec0 # 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 -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@83fd05a356d7e2593de66fc9913b3002723633cb
|
|
if: ${{ always() }}
|
|
with:
|
|
name: Report-${{ matrix.color }}-${{ matrix.scheme }}
|
|
path: app/build/reports
|
|
retention-days: 4
|