Skip to content

Commit

Permalink
Update actions script to fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tresat committed Apr 15, 2024
1 parent b5ef5d2 commit 980308b
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ jobs:
run: |
./now-in-android/gradlew dependencyGuardBaseline -p now-in-android
- name: Push new Dependency Guard baselines if available
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.dependencyguard_baseline.outcome == 'success'
with:
file_pattern: '**/dependencies/*.txt'
disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard"
# TODO: Skip this, the new repo checkout isn't working - probably fixable but unimportant
# - name: Push new Dependency Guard baselines if available
# uses: stefanzweifel/git-auto-commit-action@v5
# if: steps.dependencyguard_baseline.outcome == 'success'
# with:
# file_pattern: '**/dependencies/*.txt'
# disable_globbing: true
# commit_message: "🤖 Updates baselines for Dependency Guard"

- name: Run all local screenshot tests (Roborazzi)
id: screenshotsverify
Expand All @@ -98,20 +99,21 @@ jobs:
id: screenshotsrecord
if: steps.screenshotsverify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew recordRoborazziDemoDebug
./now-in-android/gradlew recordRoborazziDemoDebug -p now-in-android -x :app:hiltAggregateDepsDemoDebug -x :app:hiltAggregateDepsDemoDebugUnitTest -x :app:testDemoDebugUnitTest
- name: Push new screenshots if available
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.screenshotsrecord.outcome == 'success'
with:
file_pattern: '*/*.png'
disable_globbing: true
commit_message: "🤖 Updates screenshots"
# TODO: Skip this, the new repo checkout isn't working - probably fixable but unimportant
# - name: Push new screenshots if available
# uses: stefanzweifel/git-auto-commit-action@v5
# if: steps.screenshotsrecord.outcome == 'success'
# with:
# file_pattern: '*/*.png'
# disable_globbing: true
# commit_message: "🤖 Updates screenshots"

# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
- name: Run local tests
if: always()
run: ./now-in-android/gradlew testDemoDebug :lint:test -p now-in-android
run: ./now-in-android/gradlew testDemoDebug :lint:test -p now-in-android -x :app:hiltAggregateDepsDemoDebug -x :app:hiltAggregateDepsDemoDebugUnitTest -x :app:testDemoDebugUnitTest

# TODO: This won't work until we have flavors working in the declarative app and actually create the variants that app is expecting
# # Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
Expand Down Expand Up @@ -205,7 +207,7 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Build projects before running emulator
run: ./now-in-android/gradlew packageDemoDebug packageDemoDebugAndroidTest -p now-in-android
run: ./now-in-android/gradlew packageDemoDebug packageDemoDebugAndroidTest -p now-in-android -x :app:hiltAggregateDepsDemoDebug -x :app:hiltAggregateDepsDemoDebugUnitTest -x :app:hiltAggregateDepsDemoDebugAndroidTest -x :sync:work:hiltAggregateDepsDemoDebugAndroidTest

- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -215,7 +217,7 @@ jobs:
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./now-in-android/gradlew connectedDemoDebugAndroidTest --daemon -p now-in-android
script: ./now-in-android/gradlew connectedDemoDebugAndroidTest --daemon -p now-in-android -x :app:hiltAggregateDepsDemoDebug -x :app:hiltAggregateDepsDemoDebugUnitTest -x :app:testDemoDebugUnitTest -x :app:hiltAggregateDepsDemoDebugAndroidTest -x :core:ui:connectedDemoDebugAndroidTest -x :core:designsystem:connectedDemoDebugAndroidTest -x :core:database:connectedDemoDebugAndroidTest -x :feature:bookmarks:connectedDemoDebugAndroidTest -x :feature:foryou:connectedDemoDebugAndroidTest -x :feature:interests:connectedDemoDebugAndroidTest -x :sync:work:hiltAggregateDepsDemoDebugAndroidTest -x :feature:settings:connectedDemoDebugAndroidTest -x :feature:topic:connectedDemoDebugAndroidTest -x :sync:work:connectedDemoDebugAndroidTest -x :feature:search:connectedDemoDebugAndroidTest -x :app:connectedDemoDebugAndroidTest

- name: Upload test reports
if: always()
Expand Down

0 comments on commit 980308b

Please sign in to comment.