Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from teppeis/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
teppeis committed Nov 3, 2017
2 parents 6b5ca71 + 8a70b93 commit 93f5435
Show file tree
Hide file tree
Showing 6 changed files with 414 additions and 552 deletions.
79 changes: 27 additions & 52 deletions .circleci/config.yml
@@ -1,42 +1,16 @@
workflows:
version: 2
node-multi-build:
jobs:
- node-v4
- node-v6
- node-v8

version: 2
jobs:
build:
docker:
- image: node:6
working_directory: ~/working_directory
steps:
- checkout
- run:
name: Trigger Jobs
# Generate CircleCI API token with `all` privilege and set to $CIRCLE_API_TOKEN
command: |
function trigger_job() {
job_name=$1
echo "trigger_job $job_name"
http_code=$(curl --user ${CIRCLE_API_TOKEN}: \
--data build_parameters[CIRCLE_JOB]=$job_name \
--data revision=$CIRCLE_SHA1 \
-o curl.output \
-w '%{http_code}\n' \
-s \
https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/$CIRCLE_BRANCH)
cat curl.output
echo ""
echo "http_code: $http_code"
if [[ ! "$http_code" =~ ^20[0-9]$ ]]; then
echo "Bad status code: $http_code" >&2
return 1
fi
}
trigger_job node-v4
trigger_job node-v6
trigger_job node-v7
node-base: &node-base
docker:
- image: node
environment:
TEST_REPORTS: /tmp/test-reports
working_directory: ~/working_directory
steps:
- run:
Expand All @@ -47,45 +21,46 @@ jobs:
- checkout
- restore_cache:
keys:
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ checksum "yarn.lock" }}-{{ .Environment.CIRCLE_JOB }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-master-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-master-{{ .Environment.CIRCLE_JOB }}
- run:
name: Install dependencies
command: yarn install
- run:
name: Test
command: |
mkdir -p $TEST_REPORTS
# Will be fixed in yarn v0.23
# https://github.com/yarnpkg/yarn/pull/2843
# yarn test
npm test
command: yarn test
- save_cache:
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ checksum "yarn.lock" }}-{{ .Environment.CIRCLE_JOB }}
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- save_cache:
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-#{{ .BuildNum }}
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- store_test_results:
# Variables are not available in `path`
- /usr/local/share/.cache/yarn
- /root/.cache/yarn
- run:
# Variables are not available in `path` or `paths`
# https://discuss.circleci.com/t/can-i-use-variables-in-cache-paths/11393
# path: {{ .Environment.TEST_REPORTS }}
path: /tmp/test-reports
name: Check `yarn cache dir`
command: |
CACHE_DIR=$(yarn cache dir)
echo "yarn cache dir: ${CACHE_DIR}"
# v0.x or v1.x
if [[ "$CACHE_DIR" != /usr/local/share/.cache/yarn* && "$CACHE_DIR" != /root/.cache/yarn/* ]]; then
exit 1
fi
node-v4:
<<: *node-base
docker:
- image: node:4

node-v6:
<<: *node-base
docker:
- image: node:6

node-v7:
node-v8:
<<: *node-base
docker:
- image: node:7
- image: node:8
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -64,7 +64,7 @@ MIT License: Teppei Sato &lt;teppeis@gmail.com&gt;
[appveyor-url]: https://ci.appveyor.com/project/teppeis/kintone-plugin-manifest-validator/branch/master
[deps-image]: https://img.shields.io/david/teppeis/kintone-plugin-manifest-validator.svg
[deps-url]: https://david-dm.org/teppeis/kintone-plugin-manifest-validator
[node-version]: https://img.shields.io/badge/Node.js%20support-v4,v6,v7-brightgreen.svg
[node-version]: https://img.shields.io/badge/Node.js%20support-v4,v6,v8-brightgreen.svg
[coverage-image]: https://img.shields.io/coveralls/teppeis/kintone-plugin-manifest-validator/master.svg
[coverage-url]: https://coveralls.io/github/teppeis/kintone-plugin-manifest-validator?branch=master
[license]: https://img.shields.io/npm/l/@teppeis/kintone-plugin-manifest-validator.svg
4 changes: 2 additions & 2 deletions appveyor.yml
@@ -1,6 +1,6 @@
# Test against the latest version of this Node.js version
environment:
nodejs_version: "6"
nodejs_version: "8"

# Install scripts. (runs after repo cloning)
install:
Expand All @@ -15,7 +15,7 @@ test_script:
- yarn versions
- npm version
# run tests
- npm test
- yarn test

# Don't actually build.
build: off
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -20,15 +20,15 @@
"test:dts": "tsc --noEmit --strict test/manifest-schema.ts"
},
"dependencies": {
"ajv": "^5.0.0",
"bytes": "^2.5.0"
"ajv": "^5.3.0",
"bytes": "^3.0.0"
},
"devDependencies": {
"eslint": "^4.10.0",
"eslint-config-teppeis": "^6.3.1",
"intelli-espower-loader": "^1.0.1",
"json-schema-to-typescript": "^4.2.0",
"mocha": "^3.2.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.0.2",
"power-assert": "^1.4.2",
"typescript": "^2.3.2"
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Expand Up @@ -53,7 +53,7 @@ describe('validator', () => {
message: 'should be >= 1',
params: {
comparison: '>=',
exclusive: undefined,
exclusive: false,
limit: 1,
},
schemaPath: '#/properties/version/minimum',
Expand Down

0 comments on commit 93f5435

Please sign in to comment.