config.yml refactor
This commit is contained in:
parent
cf46ca3e29
commit
0e984d3029
|
@ -1,6 +1,41 @@
|
||||||
defaults: &defaults
|
defaults: &defaults
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
|
|
||||||
|
install-node: &install-node
|
||||||
|
name: Install Node 10
|
||||||
|
command: |
|
||||||
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
||||||
|
source ~/.nvm/nvm.sh
|
||||||
|
# https://github.com/creationix/nvm/issues/1394
|
||||||
|
set +e
|
||||||
|
nvm install 10
|
||||||
|
echo 'export PATH="/home/circleci/.nvm/versions/node/v10.20.1/bin:$PATH"' >> ~/.bash_profile
|
||||||
|
source ~/.bash_profile
|
||||||
|
|
||||||
|
install-npm-modules: &install-npm-modules
|
||||||
|
name: Install NPM modules
|
||||||
|
command: |
|
||||||
|
yarn
|
||||||
|
|
||||||
|
install-apple-sim-utils: &install-apple-sim-utils
|
||||||
|
name: Install appleSimUtils
|
||||||
|
command: |
|
||||||
|
brew update
|
||||||
|
brew tap wix/brew
|
||||||
|
brew install wix/brew/applesimutils
|
||||||
|
|
||||||
|
restore-npm-cache-linux: &restore-npm-cache-linux
|
||||||
|
- restore_cache:
|
||||||
|
name: Restore NPM cache
|
||||||
|
key: node-modules-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
|
save-npm-cache-linux: &save-npm-cache-linux
|
||||||
|
- save_cache:
|
||||||
|
key: node-modules-{{ checksum "yarn.lock" }}
|
||||||
|
name: Save NPM cache
|
||||||
|
paths:
|
||||||
|
- ./node_modules
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
lint-testunit:
|
lint-testunit:
|
||||||
|
@ -14,14 +49,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- restore_cache:
|
- run: *restore-npm-cache-linux
|
||||||
name: Restore NPM cache
|
|
||||||
key: node-modules-{{ checksum "yarn.lock" }}
|
|
||||||
|
|
||||||
- run:
|
- run: *install-npm-modules
|
||||||
name: Install NPM modules
|
|
||||||
command: |
|
|
||||||
yarn
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Lint
|
name: Lint
|
||||||
|
@ -38,11 +68,7 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
yarn codecov
|
yarn codecov
|
||||||
|
|
||||||
- save_cache:
|
- run: *save-npm-cache-linux
|
||||||
key: node-modules-{{ checksum "yarn.lock" }}
|
|
||||||
name: Save NPM cache
|
|
||||||
paths:
|
|
||||||
- ./node_modules
|
|
||||||
|
|
||||||
e2e-build:
|
e2e-build:
|
||||||
macos:
|
macos:
|
||||||
|
@ -58,27 +84,11 @@ jobs:
|
||||||
name: Restore NPM cache
|
name: Restore NPM cache
|
||||||
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
- run:
|
- run: *install-node
|
||||||
name: Install Node 10
|
|
||||||
command: |
|
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
# https://github.com/creationix/nvm/issues/1394
|
|
||||||
set +e
|
|
||||||
nvm install 10
|
|
||||||
|
|
||||||
- run:
|
- run: *install-apple-sim-utils
|
||||||
name: Install appleSimUtils
|
|
||||||
command: |
|
|
||||||
brew update
|
|
||||||
brew tap wix/brew
|
|
||||||
brew install wix/brew/applesimutils
|
|
||||||
|
|
||||||
- run:
|
- run: *install-npm-modules
|
||||||
name: Install NPM modules
|
|
||||||
command: |
|
|
||||||
yarn global add detox-cli
|
|
||||||
yarn
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Rebuild Detox framework cache
|
name: Rebuild Detox framework cache
|
||||||
|
@ -119,27 +129,11 @@ jobs:
|
||||||
name: Restore NPM cache
|
name: Restore NPM cache
|
||||||
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
- run:
|
- run: *install-node
|
||||||
name: Install Node 10
|
|
||||||
command: |
|
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
# https://github.com/creationix/nvm/issues/1394
|
|
||||||
set +e
|
|
||||||
nvm install 10
|
|
||||||
|
|
||||||
- run:
|
- run: *install-apple-sim-utils
|
||||||
name: Install appleSimUtils
|
|
||||||
command: |
|
|
||||||
brew update
|
|
||||||
brew tap wix/brew
|
|
||||||
brew install wix/brew/applesimutils
|
|
||||||
|
|
||||||
- run:
|
- run: *install-npm-modules
|
||||||
name: Install NPM modules
|
|
||||||
command: |
|
|
||||||
yarn global add detox-cli
|
|
||||||
yarn
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Rebuild Detox framework cache
|
name: Rebuild Detox framework cache
|
||||||
|
@ -175,25 +169,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run: *install-node
|
||||||
name: Install Node 10
|
|
||||||
command: |
|
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
# https://github.com/creationix/nvm/issues/1394
|
|
||||||
set +e
|
|
||||||
nvm install 10
|
|
||||||
echo 'export PATH="/home/circleci/.nvm/versions/node/v10.20.1/bin:$PATH"' >> ~/.bash_profile
|
|
||||||
source ~/.bash_profile
|
|
||||||
|
|
||||||
- restore_cache:
|
- run: *restore-npm-cache-linux
|
||||||
name: Restore NPM cache
|
|
||||||
key: node-modules-{{ checksum "yarn.lock" }}
|
|
||||||
|
|
||||||
- run:
|
- run: *install-npm-modules
|
||||||
name: Install NPM modules
|
|
||||||
command: |
|
|
||||||
yarn
|
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: Restore gradle cache
|
name: Restore gradle cache
|
||||||
|
@ -291,19 +271,9 @@ jobs:
|
||||||
name: Restore NPM cache
|
name: Restore NPM cache
|
||||||
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
key: node-v1-mac-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
- run:
|
- run: *install-node
|
||||||
name: Install Node 10
|
|
||||||
command: |
|
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
# https://github.com/creationix/nvm/issues/1394
|
|
||||||
set +e
|
|
||||||
nvm install 10
|
|
||||||
|
|
||||||
- run:
|
- run: *install-npm-modules
|
||||||
name: Install NPM modules
|
|
||||||
command: |
|
|
||||||
yarn
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Update Fastlane
|
name: Update Fastlane
|
||||||
|
|
Loading…
Reference in New Issue