Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

John/pipeline #750

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: 2.1

docker_image: &docker_image
- image: circleci/node:13.8.0

jobs:
build:
docker:
- <<: *docker_image
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- save_cache:
key: "npm-packages"
paths:
- /src/node_modules
- run:
name: Run tests
command: npm run lint
test:
docker:
- <<: *docker_image
steps:
- checkout
- restore_cache:
key: "npm-packages"
- run: npm install --save-dev jest
- run:
name: Run tests
command: npm run test

analyze:
docker:
- <<: *docker_image
steps:
- checkout
- restore_cache:
key: "npm-packages"
- run:
name: Run tests
command: npm audit

workflows:
build_and_test:
jobs:
- build
- test:
requires:
- build
- analyze:
requires:
- test