chore(ci and npm): Setup CircleCI and semantic-release

Setup CircleCI and semantic-release
This commit is contained in:
Thibault Malbranche 2018-10-17 14:54:44 +02:00 committed by GitHub
parent a15ff29ccf
commit 525ebfa06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6861 additions and 5 deletions

66
.circleci/config.yml Normal file
View File

@ -0,0 +1,66 @@
defaults: &defaults
working_directory: ~/code
docker:
- image: circleci/node:10.6.0-browsers
version: 2
jobs:
setup:
<<: *defaults
steps:
- checkout
- restore_cache:
name: Restore node modules
keys:
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn --pure-lockfile
- save_cache:
name: Save node modules
key: node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
tests:
<<: *defaults
steps:
- checkout
- restore_cache:
name: Restore node modules
keys:
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
- run:
name: Run Tests
command: yarn ci:test
publish:
<<: *defaults
steps:
- checkout
- restore_cache:
name: Restore node modules
keys:
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
- run:
name: Publish to NPM
command: yarn ci:publish
workflows:
version: 2
ci:
jobs:
- setup
- tests:
requires:
- setup
- publish:
requires:
- tests
filters:
branches:
only: master

1
.gitignore vendored
View File

@ -37,7 +37,6 @@ node_modules/
npm-debug.log
yarn-error.log
package-lock.json
yarn.lock
# Rubygem bundles
#

View File

@ -6,11 +6,15 @@
"contributors": [
"Thibault Malbranche <malbranche.thibault@gmail.com>"
],
"version": "2.0.0",
"version": "0.0.0-development",
"homepage": "https://github.com/react-native-community/react-native-webview#readme",
"scripts": {
"flow": "flow check",
"flow-android": "flow check --flowconfig-name .flowconfig.android"
"test:ios:flow": "flow check",
"test:android:flow": "flow check --flowconfig-name .flowconfig.android",
"ci:publish": "yarn semantic-release",
"ci:test": "yarn ci:test:flow",
"ci:test:flow": "yarn test:ios:flow && yarn test:android:flow",
"semantic-release": "semantic-release"
},
"peerDependencies": {
"react": "^16.0",
@ -22,6 +26,11 @@
},
"devDependencies": {
"flow-bin": "^0.80.0",
"react-native": "^0.57"
"react-native": "^0.57",
"semantic-release": "^15.9.17"
},
"repository": {
"type": "git",
"url": "https://github.com/react-native-community/react-native-webview.git"
}
}

6782
yarn.lock Normal file

File diff suppressed because it is too large Load Diff