2021-02-23 19:28:11 +03:00
|
|
|
name: "Screenshot Test"
|
2020-09-25 12:53:09 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2021-01-05 16:42:56 +03:00
|
|
|
branches: [ master, stable-* ]
|
2020-09-25 12:53:09 +03:00
|
|
|
|
|
|
|
jobs:
|
2021-02-23 19:28:11 +03:00
|
|
|
screenshot:
|
2020-09-25 12:53:09 +03:00
|
|
|
runs-on: macOS-latest
|
2021-02-23 19:28:11 +03:00
|
|
|
strategy:
|
2021-02-23 22:04:34 +03:00
|
|
|
fail-fast: false
|
2021-02-23 19:28:11 +03:00
|
|
|
matrix:
|
|
|
|
scheme: [ Dark, Light ]
|
|
|
|
color: [ blue, white ]
|
2020-09-25 12:53:09 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Build gplay
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/.gradle
|
|
|
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
|
|
|
|
./gradlew assembleGplayDebug
|
|
|
|
- name: Delete old comments
|
|
|
|
env:
|
|
|
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
|
|
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
2021-02-23 19:28:11 +03:00
|
|
|
run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN"
|
2020-09-25 12:53:09 +03:00
|
|
|
- name: run tests
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
with:
|
|
|
|
api-level: 27
|
|
|
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
|
2021-02-23 19:28:11 +03:00
|
|
|
script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }}
|
2020-09-25 12:53:09 +03:00
|
|
|
- name: upload failing results
|
|
|
|
if: ${{ failure() }}
|
|
|
|
env:
|
|
|
|
LOG_USERNAME: ${{ secrets.LOG_USERNAME }}
|
|
|
|
LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }}
|
|
|
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
|
|
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
|
|
run:
|
2021-02-23 19:28:11 +03:00
|
|
|
scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN"
|