diff --git a/.github/workflows/blueLight.yml b/.github/workflows/blueLight.yml deleted file mode 100644 index b29d547b43..0000000000 --- a/.github/workflows/blueLight.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Blue color on light mode" - -on: - pull_request: - branches: [ master, stable-* ] - -jobs: - blueLight: - runs-on: macOS-latest - 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 }} - run: scripts/deleteOldComments.sh "Blue-Light" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" - - 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 - script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=blue -Pandroid.testInstrumentationRunnerArguments.DARKMODE=light - - 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: - scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "Blue-Light" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" diff --git a/.github/workflows/blueDark.yml b/.github/workflows/screenShotTest.yml similarity index 74% rename from .github/workflows/blueDark.yml rename to .github/workflows/screenShotTest.yml index bee3f772d6..36f55a97d4 100644 --- a/.github/workflows/blueDark.yml +++ b/.github/workflows/screenShotTest.yml @@ -1,12 +1,16 @@ -name: "Blue color on dark mode" +name: "Screenshot Test" on: pull_request: branches: [ master, stable-* ] jobs: - blueDark: + screenshot: runs-on: macOS-latest + strategy: + matrix: + scheme: [ Dark, Light ] + color: [ blue, white ] steps: - uses: actions/checkout@v2 - name: set up JDK 1.8 @@ -22,13 +26,13 @@ jobs: env: GIT_USERNAME: ${{ secrets.GIT_USERNAME }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} - run: scripts/deleteOldComments.sh "Blue-Dark" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" + run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" - 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 - script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=blue -Pandroid.testInstrumentationRunnerArguments.DARKMODE=dark + script: ./gradlew 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: @@ -37,4 +41,4 @@ jobs: GIT_USERNAME: ${{ secrets.GIT_USERNAME }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} run: - scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "Blue-Dark" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" + scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" diff --git a/.github/workflows/whiteDark.yml b/.github/workflows/whiteDark.yml deleted file mode 100644 index 20dc3df3a6..0000000000 --- a/.github/workflows/whiteDark.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "White color on dark mode" - -on: - pull_request: - branches: [ master, stable-* ] - -jobs: - whiteDark: - runs-on: macOS-latest - 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 }} - run: scripts/deleteOldComments.sh "White-Dark" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" - - 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 - script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=white -Pandroid.testInstrumentationRunnerArguments.DARKMODE=dark - - 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: - scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "White-Dark" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" diff --git a/.github/workflows/whiteLight.yml b/.github/workflows/whiteLight.yml deleted file mode 100644 index 2026bb6bfe..0000000000 --- a/.github/workflows/whiteLight.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "White color on light mode" - -on: - pull_request: - branches: [ master, stable-* ] - -jobs: - whiteLight: - runs-on: macOS-latest - 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 }} - run: scripts/deleteOldComments.sh "White-Light" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN" - - 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 - script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=white -Pandroid.testInstrumentationRunnerArguments.DARKMODE=light - - 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: - scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "White-Light" "Screenshot" ${{github.event.number}} "$GIT_USERNAME" "$GIT_TOKEN"