reshuffle
Version:
Reshuffle is a fast, unopinionated, minimalist integration framework
62 lines • 1.4 kB
YAML
version: 2.1
aliases:
-
docker:
- image: circleci/node:12
-
- attach_workspace:
at: ~/
jobs:
build:
<<:
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run:
name: Install dependencies
command: npm ci
- save_cache:
key: dependency-cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
- ~/.cache
- run:
name: Build source
command: npm run build
- persist_to_workspace:
root: ~/
paths:
- dist
- node_modules
- project
lint:
<<:
steps:
- checkout
- <<:
- run:
name: Run lint
command: npm run lint
unit-test:
<<:
steps:
- checkout
- <<:
- run:
name: Run unit tests
command: npm run test
workflows:
version: 2
commit:
jobs:
- build
- lint:
requires:
- build
- unit-test:
requires:
- build