-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
41 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 |
---|---|---|
@@ -1,52 +1,25 @@ | ||
version: 2.1 | ||
orbs: | ||
node: 'circleci/[email protected]' | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/repo/react-native-sportlight-tour | ||
|
||
machine: | ||
docker_layer_caching: true | ||
image: circleci/classic:latest | ||
|
||
steps: | ||
- checkout: | ||
path: ~/repo/react-native-sportlight-tour | ||
|
||
- run: | ||
name: Setup NVM | ||
command: | | ||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV | ||
echo ' [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV | ||
source $BASH_ENV | ||
executor: | ||
name: node/default | ||
tag: '14.7' | ||
|
||
- run: | ||
name: Install NodeJS | ||
command: | | ||
nvm install | ||
nvm use | ||
nvm alias default node | ||
- run: | ||
name: Install Yarn | ||
command: | | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.4 | ||
echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV | ||
source $BASH_ENV | ||
- restore_cache: | ||
keys: | ||
- v1-node-modules-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
- v1-node-modules-{{ .Branch }}- | ||
- v1-node-modules- | ||
|
||
- run: | ||
name: Install dependencies | ||
command: yarn install --frozen-lockfile | ||
steps: | ||
- checkout | ||
- node/install: | ||
node-version: '14.7.0' | ||
install-npm: false | ||
install-yarn: true | ||
yarn-version: '1.22.4' | ||
|
||
- save_cache: | ||
key: v1-node-modules-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
- node/install-packages: | ||
pkg-manager: yarn | ||
|
||
- run: | ||
name: Lint | ||
|
@@ -56,6 +29,10 @@ jobs: | |
name: Compile | ||
command: yarn compile | ||
|
||
- run: | ||
name: Tests | ||
command: yarn test | ||
|
||
workflows: | ||
build-and-check: | ||
jobs: | ||
|