mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 20:22:42 +00:00
74 lines
1.5 KiB
YAML
74 lines
1.5 KiB
YAML
# Javascript Node CircleCI 2.0 configuration file
|
|
#
|
|
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
|
#
|
|
version: 2.1
|
|
|
|
orbs:
|
|
node: circleci/node@3.0.0
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: cimg/node:16.11.0
|
|
- image: mongo:4.4
|
|
|
|
working_directory: ~/homebrewery
|
|
executor: node/default
|
|
|
|
steps:
|
|
- checkout:
|
|
path: ~/homebrewery
|
|
|
|
# Download and cache dependencies
|
|
- restore_cache:
|
|
keys:
|
|
- v1-dependencies-{{ checksum "package.json" }}
|
|
# fallback to using the latest cache if no exact match is found
|
|
- v1-dependencies-
|
|
|
|
- node/install-npm
|
|
- node/install-packages:
|
|
app-dir: ~/homebrewery
|
|
cache-path: node_modules
|
|
override-ci-command: npm i
|
|
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: v1-dependencies-{{ checksum "package.json" }}
|
|
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- .
|
|
|
|
test:
|
|
docker:
|
|
- image: cimg/node:16.11.0
|
|
|
|
working_directory: ~/homebrewery
|
|
parallelism: 4
|
|
|
|
steps:
|
|
- attach_workspace:
|
|
at: .
|
|
|
|
# run tests!
|
|
- run:
|
|
name: Test - Basic
|
|
command: npm run test:basic
|
|
- run:
|
|
name: Test - Mustache Spans
|
|
command: npm run test:mustache-span
|
|
- run:
|
|
name: Test - Routes
|
|
command: npm run test:route
|
|
|
|
workflows:
|
|
build_and_test:
|
|
jobs:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- build |