Skip to content

Commit

Permalink
Run unit tests and screenshot tests on different CI runners
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Dec 6, 2024
1 parent 22fa712 commit ce9f542
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/test_and_release_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ce9f542

Please sign in to comment.