Test CI workflows

This commit is contained in:
Kimmo Puputti 2018-04-03 14:28:56 +03:00
parent e4310f6b8d
commit 418785e1ba

View file

@ -1,6 +1,75 @@
version: 2
jobs:
format:
docker:
- image: circleci/node:8.11
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-master
- yarn-packages-
- run:
name: Install Dependencies
command: yarn install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Check code formatting
command: yarn run format-ci
test:
docker:
- image: circleci/node:8.11
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-master
- yarn-packages-
- run:
name: Install Dependencies
command: yarn install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Run test suite
command: yarn run test-ci
build:
docker:
- image: circleci/node:8.11
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-master
- yarn-packages-
- run:
name: Install Dependencies
command: yarn install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Build client application
command: yarn run build
audit:
docker:
- image: circleci/node:8.11
steps:
@ -23,12 +92,11 @@ jobs:
- run:
name: Audit dependencies
command: yarn run audit
- run:
name: Check code formatting
command: yarn run format-ci
- run:
name: Build client application
command: yarn run build
- run:
name: Run test suite
command: yarn run test-ci
workflows:
version: 2
format_test_build_audit:
jobs:
- format
- test
- build
- audit