0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 16:02:38 +00:00
Files
homebrewery/.circleci/config.yml
2024-03-18 19:34:17 -04:00

87 lines
1.9 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@5.1.0
jobs:
build:
docker:
- image: cimg/node:20.8.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-
- run: sudo npm install -g npm@10.2.0
- 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:20.8.0
working_directory: ~/homebrewery
parallelism: 1
steps:
- attach_workspace:
at: .
# run tests!
- run:
name: Test - API Unit Tests
command: npm run test:api-unit
- run:
name: Test - Basic
command: npm run test:basic
- run:
name: Test - Mustache Spans
command: npm run test:mustache-syntax
- run:
name: Test - Definition Lists
command: npm run test:definition-lists
- run:
name: Test - Variables
command: npm run test:variables
- run:
name: Test - Routes
command: npm run test:route
- run:
name: Test - Coverage
command: npm run test:coverage
workflows:
build_and_test:
jobs:
- build
- test:
requires:
- build