Trying to cache build folder on GitHub

This commit is contained in:
Johannes Klein
2022-12-16 12:49:49 +01:00
parent 67a4d39968
commit ef9c28da32
2 changed files with 17 additions and 4 deletions

View File

@@ -55,6 +55,13 @@ jobs:
with:
path: node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Cache android build folder
uses: actions/cache@v3
id: androidcache
with:
path: android/app/build
key: android-app-build-${{ hashFiles('**/ci-build-cache-timestamp.txt') }}
- name: Rebuild detox from cache
if: steps.cache.outputs.cache-hit == 'true'
@@ -90,6 +97,7 @@ jobs:
distribution: 'zulu'
- name: Build for detox
if: steps.androidcache.outputs.cache-hit != 'true'
run: npm run e2e:build:android
- name: Android Emulator
@@ -102,11 +110,15 @@ jobs:
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: Reverse ADB
run: adb reverse tcp:8081 tcp:8081
- name: Android Detox
run: npm start & npm run e2e:test:android -- --cleanup --debug-synchronization 200
run: npm run e2e:test:android -- --cleanup --debug-synchronization 500 --take-screenshots failing --record-videos failing -l trace
- name: Store Detox artifacts on test failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: detox-artifacts
path: artifacts # Default path for Detox artifacts
notify:
name: Notify Slack

View File

@@ -0,0 +1 @@
22-12-16 12:43