From 112484ba683d5e7fb442dd0f78699be4dffddce0 Mon Sep 17 00:00:00 2001 From: HUI Date: Mon, 9 Oct 2023 19:06:30 +0800 Subject: [PATCH] [WIP] --- .github/workflows/ci.yml | 22 ++++++++++------------ turbo.json | 29 ----------------------------- 2 files changed, 10 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05255f32..7c9c2526 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,13 +72,13 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.os }}-turborepo-android-detox-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.os }}-turborepo-android- + ${{ runner.os }}-turborepo-android-detox- - name: Check turborepo cache for Android run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run detox:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'detox:android').cache.status") + TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then echo "turbo_cache_hit=1" >> $GITHUB_ENV @@ -103,9 +103,9 @@ jobs: path: | ~/.gradle/wrapper ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} + key: ${{ runner.os }}-gradle-detox-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | - ${{ runner.os }}-gradle- + ${{ runner.os }}-gradle-detox- - name: Install Detox dependencies shell: bash @@ -120,7 +120,6 @@ jobs: - name: Build example for Android run: | - yarn install yarn turbo run detox:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" - name: Run e2e tests @@ -152,13 +151,13 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.os }}-turborepo-ios-detox-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.os }}-turborepo-ios- + ${{ runner.os }}-turborepo-ios-detox- - name: Check turborepo cache for iOS run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'detox:ios').cache.status") + TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then echo "turbo_cache_hit=1" >> $GITHUB_ENV @@ -171,9 +170,9 @@ jobs: with: path: | **/ios/Pods - key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }} + key: ${{ runner.os }}-cocoapods-detox-${{ hashFiles('example/ios/Podfile.lock') }} restore-keys: | - ${{ runner.os }}-cocoapods- + ${{ runner.os }}-cocoapods-detox- - name: Install cocoapods if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' @@ -197,7 +196,6 @@ jobs: - name: Build example for iOS run: | - yarn install yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" - uses: futureware-tech/simulator-action@v1 diff --git a/turbo.json b/turbo.json index d5c5c6d7..331e2890 100644 --- a/turbo.json +++ b/turbo.json @@ -29,35 +29,6 @@ "!example/ios/Pods" ], "outputs": [] - }, - "detox:android": { - "inputs": [ - "package.json", - "android", - "!android/build", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/android", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" - ], - "outputs": [] - }, - "detox:ios": { - "inputs": [ - "package.json", - "*.podspec", - "ios", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/ios", - "!example/ios/build", - "!example/ios/Pods" - ], - "outputs": [] } } }