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

Migrate circleci v1 to v2 #11

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Adding make init to circleci/config.yml
steven-heng committed Nov 18, 2018
commit 4b726eea5657a658c1b7b746ce58923d2e528412
32 changes: 17 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -6,46 +6,48 @@ version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:8.9

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/node-logtify-logentries

steps:
- checkout
- run:
name: install make
command: sudo apt-get update && sudo apt-get -y install gcc make

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ .Branch }}-{{ checksum "package.json" }}
- v1-dependencies-{{ .Branch }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies
- v1-dependencies # fallback to using the latest cache if no exact match is found
- run:
name: Install dependencies
name: Installing dependencies
command: make deps

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ .Branch }}-{{ checksum "package.json" }}

- run:
name: Linting
command: make lint

- run:
name: Testing
command: make cover
command: make test

sonarqube:
docker:
- image: circleci/openjdk:8-jdk-browsers
steps:
- checkout
- run:
name: Sonar analysis
command: sudo make sonar
command: make sonar
workflows:
version: 2
build_and_test:
jobs:
- build
- sonarqube:
requires:
- build