-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
3,386 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/node-bunnymq | ||
docker: | ||
- image: circleci/node:10.15.1 | ||
- image: rabbitmq:3.6 | ||
# Specify service dependencies here if necessary | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- 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 | ||
|
||
- run: | ||
name: Install dependencies | ||
command: make deps | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ .Branch }}-{{ checksum "package.json" }} | ||
|
||
#Initialize the project and run tests | ||
- run: | ||
name: Initialize | ||
command: make init | ||
|
||
- run: | ||
name: Test project | ||
command: make cover | ||
|
||
# Special step used to persist a temporary file to be used by another job in the workflow | ||
- persist_to_workspace: | ||
root: ~/node-bunnymq | ||
paths: | ||
- coverage | ||
|
||
sonarqube: | ||
working_directory: ~/node-bunnymq | ||
docker: | ||
# Sonarqube need OpenJDK 8 to run his analysis correctly | ||
- image: circleci/openjdk:8-jdk-browsers | ||
steps: | ||
- checkout | ||
# Special step used to attach the workflow’s workspace to the current container | ||
# Retrieve coverage's folder for sonarqube | ||
- attach_workspace: | ||
at: ~/node-bunnymq | ||
|
||
# Sonarqube need to have node installed to run his analysis | ||
- run: | ||
name: Install node | ||
command: | | ||
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | ||
sudo apt install nodejs | ||
- run: | ||
name: Sonar analysis | ||
command: make sonar | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- build | ||
- sonarqube: | ||
# sonarqube's job waiting for build's job before to run | ||
requires: | ||
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
/.sonar/** | ||
/logs/** | ||
/.idea/** | ||
/samples/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.