Skip to content

Commit dcf070c

Browse files
fix: optimize caching keys for Android and iOS workflows
1 parent 68c417f commit dcf070c

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/android.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
4545
with:
4646
path: example/android/app/build/outputs/apk/debug/app-debug.apk
47-
key: ${{ runner.os }}-apk-${{ hashFiles('android/**/*.{java,kt,xml}', 'example/android/**/*.{java,kt,xml,gradle}', 'src/**/*.{js,jsx,ts,tsx}', 'package.json', 'yarn.lock') }}
47+
key: ${{ runner.os }}-apk-${{ hashFiles('android/**/*.{java,kt,xml,gradle}', 'example/android/**/*.{java,kt,xml,gradle}', 'package.json', 'yarn.lock') }}
4848

4949
- name: AVD cache
5050
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
@@ -104,7 +104,7 @@ jobs:
104104
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -memory 4096
105105
script: echo "Generated AVD snapshot for caching."
106106

107-
# Launch AVD and install app
107+
# Launch AVD, install app, and run tests
108108
- name: Run Harness E2E tests
109109
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
110110
with:
@@ -118,12 +118,9 @@ jobs:
118118
disable-animations: true
119119
emulator-boot-timeout: 900
120120
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -memory 4096
121-
script: yarn app:install:android
122-
123-
# Run tests
124-
- name: Run Harness E2E tests
125-
working-directory: example
126-
run: yarn harness:android
121+
script: |
122+
yarn app:install:android
123+
yarn harness:android
127124
128125
# Cleanup
129126
- name: Stop Gradle Daemon

.github/workflows/ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
4040
with:
4141
path: example/ios/build/Build/Products/Debug-iphonesimulator/MendixNativeExample.app
42-
key: ios-app-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock', 'example/ios/**/*.{swift,h,m,mm}', 'ios/**/*.{swift,h,m,mm}', 'src/**/*.{js,jsx,ts,tsx}', 'package.json', 'yarn.lock', '.github/workflows/ios.yml') }}
42+
key: ios-app-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock', 'example/ios/**/*.{swift,h,m,mm}', 'ios/**/*.{swift,h,m,mm}', 'package.json', 'yarn.lock', '.github/workflows/ios.yml') }}
4343

4444
# Build dependencies (only if app not cached)
4545
- name: Cache DerivedData

0 commit comments

Comments
 (0)