Skip to content

Commit

Permalink
CI configs
Browse files Browse the repository at this point in the history
  • Loading branch information
chungryan committed Aug 20, 2018
1 parent 775e4e1 commit d1e5fc8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: 2

defaults: &defaults
working_directory: ~/repo
docker:
- image: madecomfyau/node-aws:10

jobs:
test:
<<: *defaults
steps:
- checkout

- restore_cache:
keys:
- v1-yarn-cache-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-yarn-cache-

- run: yarn install
- run: yarn lint
- run: yarn test

- save_cache:
paths:
- node_modules
key: v1-yarn-cache-{{ checksum "yarn.lock" }}

- persist_to_workspace:
root: ~/repo
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish

workflows:
version: 2
test-deploy:
jobs:
- test:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,8 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

eslint-config-madecomfy@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/eslint-config-madecomfy/-/eslint-config-madecomfy-1.0.2.tgz#2ee2966a0616c66389c7fc5b03a942b80357d073"
version "1.0.3"
resolved "https://registry.yarnpkg.com/eslint-config-madecomfy/-/eslint-config-madecomfy-1.0.3.tgz#de22c1b2ff37616a80722c02566c2354707c75b1"
dependencies:
eslint-config-prettier "^3.0.1"
eslint-plugin-cypress "^2.0.1"
Expand Down

0 comments on commit d1e5fc8

Please sign in to comment.