-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try bringing in the yarn install from the orb for testing
- Loading branch information
1 parent
60735a0
commit 958892f
Showing
1 changed file
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,49 @@ version: 2.1 | |
orbs: | ||
rn: react-native-community/[email protected] | ||
commands: | ||
rc_yarn_install: | ||
parameters: | ||
path: | ||
description: Path to run yarn install | ||
type: string | ||
default: "./" | ||
cache: | ||
description: Save and restore the build cache? Defaults to true | ||
type: boolean | ||
default: true | ||
cache_folder: | ||
description: The path to the yarn cache folder. Defaults to /tmp/yarn | ||
type: string | ||
default: "/tmp/yarn" | ||
cache_key: | ||
description: A key when cache needs to go | ||
type: string | ||
default: "v1" | ||
|
||
steps: | ||
- when: | ||
condition: <<parameters.cache>> | ||
steps: | ||
- run: | ||
name: Create cache checksum file | ||
command: | | ||
mkdir -p ~/.tmp/checksumfiles | ||
find . -type f -name 'package.json' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/package.json | ||
find . -type f -name 'yarn.lock' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/yarn.lock | ||
- restore_cache: | ||
keys: | ||
- yarn-cache-<<parameters.cache_key>>-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ checksum "~/.tmp/checksumfiles/yarn.lock" }}-{{ .Environment.CACHE_VERSION }} | ||
- run: | ||
name: Yarn Install | ||
command: "yarn install --cwd <<parameters.path>> --frozen-lockfile --non-interactive --cache-folder <<parameters.cache_folder>>" | ||
- when: | ||
condition: <<parameters.cache>> | ||
steps: | ||
- save_cache: | ||
paths: | ||
- <<parameters.cache_folder>> | ||
key: | | ||
yarn-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ checksum "~/.tmp/checksumfiles/yarn.lock" }}-{{ .Environment.CACHE_VERSION }} | ||
yarn_install_example: | ||
steps: | ||
- run: | ||
|
@@ -78,8 +121,6 @@ jobs: | |
steps: | ||
- checkout | ||
- yarn_install_example | ||
- rn/android_build: | ||
project_path: examples/purchaseTester/android | ||
- rn/android_build: | ||
project_path: examples/purchaseTesterTypescript/android | ||
ios: | ||
|
@@ -90,8 +131,10 @@ jobs: | |
- checkout | ||
- rn/ios_simulator_start: | ||
device: iPhone 11 Pro | ||
- yarn_install_example | ||
#- yarn_install_example | ||
#- rn/yarn_install | ||
- rc_yarn_install: | ||
path: examples/purchaseTesterTypescript | ||
- install_pods | ||
- rn/ios_build: | ||
build_configuration: Release | ||
|