Skip to content

Updated CI config for better linting #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 31 additions & 59 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,34 @@
#
version: 2
jobs:
build:
branches:
only: master

lint:
working_directory: ~/repo
docker:
# specify the version you desire here
- image: circleci/node:12

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

steps:
- checkout
- restore_cache:
key: dependencies-cache-{{ checksum "package.json" }}
- run: yarn install
- save_cache:
key: dependencies-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run: yarn lint
build:
working_directory: ~/repo

docker:
- image: circleci/node:12
steps:
- checkout

# 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-

key: dependencies-cache-{{ checksum "package.json" }}
- run: yarn install

- save_cache:
key: dependencies-cache-{{ checksum "package.json" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn build
# - run: yarn deploy
- run:
name: deploy
command: |
Expand All @@ -51,39 +44,18 @@ jobs:
git add .
git commit -m "generated docs"
git push origin HEAD:gh-pages --force
lint:
branches:
ignore:
- master
- gh-pages

docker:
# specify the version you desire here
- image: circleci/node:12

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# 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: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn lint
workflows:
version: 2
lint_and_build:
jobs:
- lint:
filters:
branches:
ignore:
- master
- gh-pages
- build:
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"hexo-server": "^0.3.1",
"hoek": "^6.1.2",
"request": "^2.85.0",
"zhlint": "git+https://github.com/Jinjiang/zhlint.git"
"zhlint": "^0.2.2"
}
}
Loading