react-native-dotenv
Version:
Load environment variables using import statements.
116 lines (92 loc) • 2.59 kB
YAML
version: 2
defaults:
workspace_root:
~/react-native-dotenv
nodejs_container:
working_directory:
docker:
- image: circleci/node:12-stretch
filters:
tags:
only: '/v[0-9]+(\.[0-9]+)*/'
attach_workspace:
attach_workspace:
at:
restore_node_modules:
restore_cache:
name: Restore node_modules cache
keys:
- v3-react-native-dotenv-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v3-react-native-dotenv-node-main-{{ checksum "yarn.lock" }}
- v3-react-native-dotenv-node-main-
jobs:
checkout:
<<:
steps:
- checkout
- persist_to_workspace:
root:
paths:
- ./
install:
<<:
steps:
-
-
- restore_cache:
name: Restore yarn cache
keys:
- v3-react-native-dotenv-yarn-{{ checksum "yarn.lock" }}
- v3-react-native-dotenv-yarn-
- run:
name: Install dependencies
command: yarn --frozen-lockfile
- save_cache:
name: Save yarn cache
key: v3-react-native-dotenv-yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn/
- save_cache:
name: Save node_modules cache
key: v3-react-native-dotenv-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
lint:
<<:
steps:
-
-
- run:
name: Lint JavaScript
command: yarn xo
test:
<<:
steps:
-
-
- run:
name: Run tests
command: yarn test
- store_test_results:
path: reports/tests/
- run:
name: Upload code coverage to codecov
command: yarn codecov
workflows:
version: 2
push:
jobs:
- checkout:
filters:
- install:
requires:
- checkout
filters:
- lint:
requires:
- install
filters:
- test:
requires:
- install
filters: