Skip to content

Commit

Permalink
[WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Oct 9, 2023
1 parent d5fb6b7 commit 112484b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 41 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand Down
29 changes: 0 additions & 29 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
}
}

0 comments on commit 112484b

Please sign in to comment.