Skip to content

Commit

Permalink
Add CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni committed Apr 6, 2019
1 parent 5d452d0 commit 2312eb0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
aliases:
- &save-cache-yarn
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- ./node_modules
- &restore-cache-yarn
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}

defaults: &defaults
working_directory: ~/ios-simulator-app-exporter
docker:
- image: circleci/node:10

version: 2
jobs:
checkout:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-yarn
- run:
name: Yarn version
command: yarn -v
- run:
name: Yarn Install
command: |
yarn install --frozen-lockfile --no-progress --non-interactive --cache-folder ~/.cache/yarn
- save_cache: *save-cache-yarn
- persist_to_workspace:
root: .
paths: .
test:
<<: *defaults
steps:
- attach_workspace:
at: ~/ios-simulator-app-exporter
- run:
name: Run test
command: yarn test
lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/ios-simulator-app-exporter
- run:
name: Lint
command: yarn lint

workflows:
version: 2
tests:
jobs:
- checkout
- test:
requires:
- checkout
- lint:
requires:
- checkout
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"start": "node index.js",
"test": "jest",
"lint": "eslint .",
"precommit": "lint-staged"
},
"author": "Nicolas Charpentier <[email protected]>",
Expand Down

0 comments on commit 2312eb0

Please sign in to comment.