You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
version: 2
|
|
jobs:
|
|
build: &shared-config
|
|
docker:
|
|
- image: circleci/node:lts-fermium
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package.json" }}-v1
|
|
- dependencies-
|
|
- run: yarn install
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: dependencies-{{ checksum "package.json" }}-v1
|
|
testUnit:
|
|
<<: *shared-config
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: dependencies-{{ checksum "package.json" }}-v1
|
|
- run: yarn test:unit
|
|
server-doc-deploy:
|
|
<<: *shared-config
|
|
working_directory: ~/repo
|
|
steps:
|
|
- attach_workspace:
|
|
at: /tmp
|
|
- run:
|
|
name: Install netlify
|
|
command: yarn add netlify-cli -D
|
|
- run:
|
|
name: Deploy app
|
|
command: yarn netlify deploy --prod --dir=/repo
|
|
|
|
workflows:
|
|
version: 2
|
|
build-test-and-lint:
|
|
jobs:
|
|
- build
|
|
- testUnit:
|
|
requires:
|
|
- build
|
|
- server-doc-deploy:
|
|
requires:
|
|
- build
|
|
- testUnit
|
|
filters:
|
|
branches:
|
|
only: main
|