Skip to content

Commit

Permalink
add circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
njoyard committed Nov 22, 2018
1 parent b3e8ac7 commit fc6a5f3
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
defaults: &defaults
docker:
- image: circleci/node:10-browsers
environment:
JOBS: 2
working_directory: ~/perfo

version: 2
jobs:
checkout_code:
<<: *defaults
steps:
- checkout
- persist_to_workspace:
root: .
paths:
- .

install_dependencies:
<<: *defaults
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- eaf-node10-v1-{{ checksum "yarn.lock" }}
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run:
name: Yarn Install
command: yarn install --non-interactive
- save_cache:
key: eaf-node10-v1-{{ checksum "yarn.lock" }}
paths:
- ~/perfo/node_modules
- persist_to_workspace:
root: .
paths:
- .

lint:
<<: *defaults
steps:
- attach_workspace:
at: .
- run: echo 'export PATH=~/perfo/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
name: Lint
command: yarn lint:js

test:
<<: *defaults
steps:
- attach_workspace:
at: .
- run: echo 'export PATH=~/perfo/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
name: Run Tests
command: yarn test

workflows:
version: 2
test:
jobs:
- checkout_code
- install_dependencies:
requires:
- checkout_code
- lint:
requires:
- install_dependencies
- test:
requires:
- install_dependencies

0 comments on commit fc6a5f3

Please sign in to comment.