Skip to content

Commit bebabb1

Browse files
authored
circle ci initial config (#1)
* circle ci initial config * background true * change run test command * script for circleci * run single thread for ci Co-authored-by: Serhat Bolsu
1 parent 601b17a commit bebabb1

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.circleci/config.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
7+
jobs:
8+
build:
9+
docker:
10+
# specify the version you desire here
11+
- image: circleci/node:12.2.0
12+
# - image: circleci/openjdk:8-jdk-stretch
13+
# Specify service dependencies here if necessary
14+
# CircleCI maintains a library of pre-built images
15+
# documented at https://circleci.com/docs/2.0/circleci-images/
16+
# - image: circleci/mongo:3.4.4
17+
18+
working_directory: ~/project
19+
20+
# environment:
21+
# JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
22+
23+
steps:
24+
- checkout
25+
26+
# Download and cache dependencies
27+
- restore_cache:
28+
keys:
29+
- v1-dependencies-{{ checksum "package.json" }}
30+
# fallback to using the latest cache if no exact match is found
31+
- v1-dependencies-
32+
33+
- run:
34+
name: "Install dependencies"
35+
command: |
36+
npm install
37+
- run: npm install jest-junit #just for CircleCI
38+
39+
- save_cache:
40+
paths:
41+
- node_modules
42+
key: v1-dependencies-{{ checksum "package.json" }}
43+
44+
- run:
45+
name: "Start Vegetable API"
46+
command: npm start
47+
background: true
48+
49+
- run:
50+
name: "Run tests"
51+
command: |
52+
npm test -- --runInBand --reporters=jest-junit
53+
environment:
54+
JEST_JUNIT_OUTPUT_DIR: ./reports/junit/
55+
56+
- store_test_results:
57+
path: ./reports/junit
58+
59+
- store_artifacts:
60+
path: ./reports/junit

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
]
2626
]
2727
},
28-
"author": "",
28+
"author": "Serhat Bolsu",
2929
"license": "ISC",
3030
"dependencies": {
3131
"@babel/core": "^7.9.6",

0 commit comments

Comments
 (0)