Skip to content

Commit

Permalink
feat: circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
DonChangfoot committed Sep 2, 2019
1 parent 04171af commit 103594e
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 8 deletions.
86 changes: 86 additions & 0 deletions .circleci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2

defaults: &defaults
working_directory: ~/repo
docker:
# Use active LTS release: https://github.com/nodejs/Release#release-schedule
- image: circleci/node:10.13

jobs:
test:
<<: *defaults
steps:

- checkout

- restore_cache:
keys:
# when lock file changes, use increasingly general patterns to restore cache
- "node-v1-{{ .Branch }}-{{ checksum \"yarn.lock\" }}"
- "node-v1-{{ .Branch }}-"
- "node-v1-"

- run:
name: Install
command: yarn install

- run:
name: Lint
command: yarn lint:all

- run:
name: Build
command: yarn build

- run:
name: Test with coverage
command: yarn cover

- run:
name: Upload coverage
command: yarn codecov

- save_cache:
paths:
- node_modules
key: node-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}

- persist_to_workspace:
root: ~/repo
paths: .

deploy:
<<: *defaults
steps:

- attach_workspace:
at: ~/repo

- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc

- run:
name: Publish package
command: yarn publish:release

workflows:
version: 2
test-deploy:
jobs:
- test:
filters:
tags:
only: /.*/
- deploy:
requires:
- test
filters:
tags:
only: /(@v\.[0-9]+)*/
branches:
only: master
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"cover": "lerna run cover --concurrency=1 --stream",
"prepare:release": "lerna version",
"prepare:prerelease": "yarn prepare:release prerelease --preid alpha",
"publish:canary": "lerna publish --canary",
"publish:release": "lerna publish from-package",
"publish:canary": "lerna publish --canary --yes",
"publish:release": "lerna publish from-git --yes",
"lint": "eslint --cache --cache-location node_modules/.cache/eslint",
"lint:all": "yarn lint 'packages/*/src/**/*.ts*'",
"lint:staged": "lint-staged"
Expand Down
5 changes: 5 additions & 0 deletions packages/ilp-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "ilp-logger",
"version": "2.0.0",
"author": "Interledger Team <info@interledger.org>",
"license": "Apache-2.0",
"description": "Logging utility for Interledger modules",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand All @@ -9,6 +11,9 @@
"build/**/*.js.map",
"build/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf .nyc_output/* build/* coverage/*",
"build": "tsc -p tsconfig.build.json",
Expand Down
5 changes: 5 additions & 0 deletions packages/ilp-packet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "ilp-packet",
"version": "4.0.0",
"author": "Interledger Team <info@interledger.org>",
"license": "Apache-2.0",
"description": "Module for parsing and serializing ILP packets",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand All @@ -12,6 +14,9 @@
"build/**/*.js.map",
"build/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf .nyc_output/* build/* coverage/*",
"build": "tsc -p tsconfig.build.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/ilp-protocol-ccp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"build/**/*.js.map",
"build/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf .nyc_output/* build/* coverage/*",
"build": "tsc -p tsconfig.build.json",
Expand Down
5 changes: 5 additions & 0 deletions packages/ilp-protocol-ildcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "ilp-protocol-ildcp",
"version": "3.0.0",
"author": "Interledger Team <info@interledger.org>",
"license": "Apache-2.0",
"description": "Implementation of the Interledger Dynamic Configuration Protocol (IL-DCP)",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand All @@ -12,6 +14,9 @@
"build/**/*.js.map",
"build/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf .nyc_output/* build/* coverage/*",
"build": "tsc -p tsconfig.build.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/oer-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"build/**/*.js.map",
"build/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf .nyc_output/* build/* coverage/*",
"build": "tsc -p tsconfig.build.json",
Expand Down
6 changes: 0 additions & 6 deletions tsconfig.test.json

This file was deleted.

0 comments on commit 103594e

Please sign in to comment.