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.
70 lines
1.6 KiB
70 lines
1.6 KiB
version: 2.1
|
|
jobs:
|
|
install:
|
|
docker:
|
|
- image: cimg/node:16.10.0
|
|
auth:
|
|
username: anthonyjhoiro
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- run:
|
|
name: Install deps using Yarn
|
|
command: yarn install
|
|
|
|
- save_cache:
|
|
name: Save Yarn Package Cache
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
|
|
lint:
|
|
docker:
|
|
- image: cimg/node:16.10.0
|
|
auth:
|
|
username: anthonyjhoiro
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-lint-{{ .BuildNum }}
|
|
- run:
|
|
name: Check files format
|
|
command: yarn format:check
|
|
|
|
- run:
|
|
name: Lint files
|
|
command: yarn lint
|
|
|
|
- save_cache:
|
|
name: Save linted files
|
|
key: npm-v1-lint-{{ checksum "src" }}
|
|
paths:
|
|
- src
|
|
test-ci:
|
|
docker:
|
|
- image: cimg/node:16.10.0
|
|
auth:
|
|
username: anthonyjhoiro
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-lint-{{ .BuildNum }}
|
|
- run:
|
|
name: Unit Tests
|
|
command: yarn test
|
|
|
|
workflows:
|
|
build-workflow:
|
|
jobs:
|
|
- install
|
|
- lint
|
|
- test-ci
|