Browse Source

🔧 add format check cmd

build_and_test_config
hallouma875 5 years ago
parent
commit
93714ebc58
  1. 27
      .circleci/config.yml

27
.circleci/config.yml

@ -11,7 +11,7 @@ aliases:
install_node_modules: &install_node_modules install_node_modules: &install_node_modules
run: run:
command: yarn install
command: yarn install && yarn format:check
save_cache: &save_cache save_cache: &save_cache
save_cache: save_cache:
key: yarn-cache-netlify-{{ checksum "yarn.lock" }} key: yarn-cache-netlify-{{ checksum "yarn.lock" }}
@ -31,7 +31,7 @@ jobs:
- <<: *save_cache - <<: *save_cache
- run: - run:
name: Test name: Test
command: yarn run test && yarn format:check
command: yarn run test
build: build:
executor: node executor: node
steps: steps:
@ -45,6 +45,21 @@ jobs:
root: ./ root: ./
paths: paths:
- public - public
deploy:
executor: node
steps:
- checkout
- attach_workspace:
at: ./
- <<: *restore_cache
- <<: *install_node_modules
- run:
name: Install netlify-cli
command: sudo yarn install -g --silent netlify-cli
- run:
name: Deploy to Netlify
command: netlify deploy --dir=./public -p
workflows: workflows:
test_build_and_deploy: test_build_and_deploy:
jobs: jobs:
@ -55,4 +70,10 @@ workflows:
- gh-pages - gh-pages
- build: - build:
requires: requires:
- test
- test
- deploy:
requires:
- build
filters:
branches:
only: main
Loading…
Cancel
Save