From ce9f54205ae0af2ce0517b5fe1cf346ad9ee762c Mon Sep 17 00:00:00 2001 From: Saket Narayan Date: Fri, 6 Dec 2024 13:37:52 -0500 Subject: [PATCH] Run unit tests and screenshot tests on different CI runners --- .../workflows/test_and_release_snapshot.yml | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_release_snapshot.yml b/.github/workflows/test_and_release_snapshot.yml index 2b26ff46..e7cca14d 100644 --- a/.github/workflows/test_and_release_snapshot.yml +++ b/.github/workflows/test_and_release_snapshot.yml @@ -2,12 +2,12 @@ name: Run tests and publish snapshot on: push: - branches: [ trunk, saket/dec6/run-all-tests-on-macos ] + branches: [ trunk ] pull_request: jobs: - checks: - name: Run tests + unit-tests: + name: Unit tests runs-on: macos-latest steps: @@ -21,13 +21,24 @@ jobs: java-version: 17 - uses: gradle/actions/setup-gradle@v4 - - uses: oNaiPs/secrets-to-env-action@v1 - with: - secrets: ${{ toJSON(secrets) }} - - name: Run unit tests and friends run: ./gradlew check + screenshot-tests: + name: Android screenshot tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + - uses: gradle/actions/setup-gradle@v4 + - name: Run paparazzi screenshot tests run: ./gradlew verifyPaparazziDebug @@ -41,6 +52,10 @@ jobs: **/out/failures/ paparazzi/paparazzi-gradle-plugin/src/test/projects/**/build/reports/paparazzi/images/ + - uses: oNaiPs/secrets-to-env-action@v1 + with: + secrets: ${{ toJSON(secrets) }} + - name: Run instrumented screenshot tests env: # https://docs.emulator.wtf/github/tokenless @@ -63,7 +78,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 if: github.repository == 'saket/telephoto' && github.ref == 'refs/heads/trunk' - needs: [checks] + needs: [unit-tests, screenshot-tests] steps: - uses: actions/checkout@v3 - uses: gradle/wrapper-validation-action@v1