Use Circle CI to run lint, prettier, flow, and tests

This commit is contained in:
Brian Vaughn
2019-04-12 09:17:42 -07:00
parent 7bb2299de4
commit be930d5490
3 changed files with 43 additions and 2 deletions
+39
View File
@@ -0,0 +1,39 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:7.10
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn prettier:ci
- run: yarn lint:ci
- run: yarn flow
- run: yarn test
+3 -1
View File
@@ -40,8 +40,10 @@
"deploy:firefox": "node ./shells/browser/firefox/deploy",
"linc": "lint-staged",
"lint": "eslint '**/*.js'",
"lint:ci": "eslint '**/*.js' --max-warnings 0",
"precommit": "lint-staged",
"prettier": "prettier --write '**/*.{js,json,css}'",
"prettier:ci": "prettier --check '**/*.{js,json,css}'",
"start": "cd ./shells/dev && opener ./index.html && webpack --config webpack.config.js --watch",
"test": "jest",
"test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
@@ -117,7 +119,7 @@
"nullthrows": "^1.0.0",
"object-assign": "4.0.1",
"opener": "^1.5.1",
"prettier": "^1.16.1",
"prettier": "^1.16.4",
"prop-types": "^15.6.2",
"react": "^16.9.0-alpha.0",
"react-color": "^2.11.7",
+1 -1
View File
@@ -8730,7 +8730,7 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
prettier@^1.16.1:
prettier@^1.16.4:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==