forked from Agoric/agoric-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99199a9
commit d4a4f04
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
version: 2.0 | ||
|
||
aliases: | ||
|
||
install_npm_default: &install_npm | ||
run: | ||
name: Update npm | ||
command: 'sudo npm install -g npm@latest' | ||
restore_cache_default: &restore_cache # special step to restore the dependency cache | ||
restore_cache: | ||
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
install_npm_packages_default: &install_npm_packages | ||
run: | ||
name: Install npm packages | ||
command: npm install | ||
save_cache_default: &save_cache # special step to save the dependency cache | ||
save_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
paths: | ||
- ./node_modules | ||
|
||
jobs: | ||
|
||
# Lint and Test | ||
|
||
lint_and_test_node_11: &lint_and_test | ||
docker: | ||
- image: circleci/node:11 | ||
steps: | ||
- checkout | ||
- *install_npm | ||
- *restore_cache | ||
- *install_npm_packages | ||
- *save_cache | ||
# We run the tests first because that builds the kernel as the | ||
# first step | ||
- run: &test | ||
name: Test | ||
command: npm test | ||
- run: &lint | ||
name: Lint | ||
command: npm run lint-check | ||
|
||
|
||
# Automated Npm Audit Fix PR | ||
|
||
npm_audit_node_11: &npm_audit | ||
docker: | ||
- image: circleci/golang:1.12.0-node | ||
steps: | ||
- checkout | ||
- run: | ||
name: Update npm | ||
command: 'sudo npm install -g npm@latest' | ||
- run: | ||
name: install hub | ||
command: | | ||
set -xe | ||
go get -u -d github.com/github/hub | ||
cd /go/src/github.com/github/hub | ||
go install github.com/github/hub | ||
- run: | ||
name: Submit PR if npm audit fix makes changes | ||
command: ./scripts/npm-audit-fix.sh | ||
|
||
|
||
workflows: | ||
version: 2 | ||
test_all: | ||
jobs: | ||
- lint_and_test_node_11 | ||
nightly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- npm_audit_node_11 |