Skip to content

Commit

Permalink
Merge pull request #2 from phenyl-js/feat/addCircleci
Browse files Browse the repository at this point in the history
Add CircleCi
  • Loading branch information
Naturalclar authored Apr 20, 2019
2 parents 3d8d4a4 + e1884d4 commit adcdd60
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2.1

executors:
default:
working_directory: ~/repo
docker:
- image: circleci/node:8.11.3
commands:
prepare:
steps:
- checkout
- run: ls package.json | xargs -n1 md5sum > deps.txt
- run:
# https://yarnpkg.com/ja/docs/install#linux-tab
name: Install [email protected]
command: |
sudo unlink $(which yarn)
sudo npm i -g [email protected]
- run:
name: Display version of Node.js, npm, Yarn
command: |
node -v
npm -v
yarn --version
jobs:
test:
executor:
name: default
steps:
- prepare
- restore_cache:
keys:
- v{{ .Environment.CIRCLECI_CACHE_VERSION }}-dependencies-{{ .Branch }}-{{ checksum "deps.txt" }}
- run: yarn
- save_cache:
paths:
- node_modules
key: v{{ .Environment.CIRCLECI_CACHE_VERSION }}-dependencies-{{ .Branch }}-{{ checksum "deps.txt" }}
- run: yarn ci-test
- run: yarn type-check
- run: yarn build
workflows:
version: 2.1
test_deploy:
jobs:
- test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"scripts": {
"build": "tsc --declaration",
"ci-test": "nyc mocha --require ts-node/register 'test/**/*.ts' --color always",
"test": "mocha --require ts-node/register 'test/**/*.ts' --color always"
"test": "mocha --require ts-node/register 'test/**/*.ts' --color always",
"type-check": "tsc --noEmit"
},
"dependencies": {
"buffer": "^5.1.0",
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"rootDir": "src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,

// "composite": true, /* Enable project compilation */
// "incremental": true, /* Enable incremental compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
Expand Down Expand Up @@ -58,5 +59,6 @@
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}
},
"exclude": ["test"]
}

0 comments on commit adcdd60

Please sign in to comment.