This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from infinitered/circle-ci-cleanup
Configure for Circle CI
- Loading branch information
Showing
2 changed files
with
103 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
|
||
defaults: &defaults | ||
docker: | ||
# Choose the version of Node you want here | ||
- image: circleci/node:10.11 | ||
working_directory: ~/repo | ||
|
||
version: 2 | ||
jobs: | ||
setup: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
name: Restore node modules | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
yarn install | ||
- save_cache: | ||
name: Save node modules | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
|
||
tests: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
name: Restore node modules | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Install React Native CLI and Ignite CLI | ||
command: | | ||
sudo npm i -g ignite-cli react-native-cli | ||
- run: | ||
name: Run tests | ||
command: yarn ci:test # this command will be added to/found in your package.json scripts | ||
|
||
publish: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
- restore_cache: | ||
name: Restore node modules | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
# Run semantic-release after all the above is set. | ||
- run: | ||
name: Publish to NPM | ||
command: yarn ci:publish # this will be added to your package.json scripts | ||
|
||
workflows: | ||
version: 2 | ||
test_and_release: | ||
jobs: | ||
- setup | ||
- tests: | ||
requires: | ||
- setup | ||
- publish: | ||
requires: | ||
- tests | ||
filters: | ||
branches: | ||
only: master |
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