Skip to content

Commit

Permalink
New circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogasparin committed Dec 11, 2017
1 parent ae72f81 commit 3765bf9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 2
jobs:
build:
working_directory: ~/pollicino-ui

docker:
- image: node:8.9

steps:
- checkout

- run:
name: Pre-Dependencies
command: mkdir -p ~/pollicino-ui/artifacts

- restore_cache:
key: pollicino-ui-{{ checksum "package.json" }}

- run:
name: Install Dependencies
command: npm i --silent

- run:
name: Install CI Dependencies
command: npm i --silent mocha-junit-reporter

- save_cache:
key: pollicino-ui-{{ checksum "package.json" }}
paths:
- "~/.npm"
- "~/pollicino-ui/node_modules"

- run:
name: Run Linting
command: npm run lint -s

- run:
name: Run Unit Tests
command: npm run test:unit -- --reporter mocha-junit-reporter
environment:
MOCHA_FILE: ./artifacts/unit-results.xml

- store_test_results:
path: ~/pollicino-ui/artifacts

- store_artifacts:
path: ~/pollicino-ui/artifacts
destination: artifacts

0 comments on commit 3765bf9

Please sign in to comment.