File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 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 : |
47+ npm start
48+
49+ - run :
50+ name : " Run tests"
51+ command : |
52+ npm test -- --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
You can’t perform that action at this time.
0 commit comments