Skip to content

Commit

Permalink
fix: updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 20, 2018
1 parent e17e4aa commit 28b9e3b
Show file tree
Hide file tree
Showing 9 changed files with 541 additions and 216 deletions.
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
- checkout
- restore_cache: &restore_cache
keys:
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-master-
- run: ./scripts/circleci test
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/test"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/test"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/test"}}-{{checksum ".circleci/config.yml"}}-master-
- run: ./.circleci/test
- store_test_results:
path: ~/cli/reports
- save_cache: &save_cache
key: v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
key: v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/test"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
Expand All @@ -30,7 +30,8 @@ jobs:
steps:
- checkout
- restore_cache: *restore_cache
- run: ./scripts/circleci release
- run: yarn --frozen-lockfile
- run: ./node_modules/.bin/nps ci.release
- save_cache: *save_cache

workflows:
Expand Down
35 changes: 35 additions & 0 deletions .circleci/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

set -ex

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
git config --global push.default simple
git config --global user.email "$GIT_EMAIL"
git config --global user.user "$GIT_USERNAME"
fi

git submodule sync
git submodule update --init --recursive

CLI_ENGINE_UTIL_YARN_ARGS="--frozen-lockfile"

if [[ "$CIRCLE_BRANCH" == greenkeeper/* ]]; then
CLI_ENGINE_GREENKEEPER_BRANCH=1
CLI_ENGINE_UTIL_YARN_ARGS=""
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
yarn global add greenkeeper-lockfile@1
fi
greenkeeper-lockfile-update
fi

yarn install $CLI_ENGINE_UTIL_YARN_ARGS

if [[ "$CLI_ENGINE_GREENKEEPER_BRANCH" == 1 ]]; then
greenkeeper-lockfile-upload
fi

mkdir -p reports
./node_modules/.bin/nps ci
curl -s https://codecov.io/bash | bash
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cache:

install:
- ps: Install-Product node $env:nodejs_version x64
- git submodule sync
- git submodule update --init --recursive
- git config --global user.email "dxcli@example.com"
- git config --global user.name "dxcli"
- yarn
Expand Down
76 changes: 76 additions & 0 deletions package-scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
const {concurrent, series} = require('nps-utils')

module.exports = {
scripts: {
build: 'rm -rf lib && tsc',
lint: {
default: concurrent.nps('lint.eslint', 'lint.commitlint', 'lint.tsc', 'lint.tslint'),
eslint: {
script: 'eslint .',
description: 'lint js files',
},
commitlint: {
script: 'commitlint --from origin/master',
description: 'ensure that commits are in valid conventional-changelog format',
},
tsc: {
script: 'tsc -p test --noEmit',
description: 'syntax check with tsc',
},
tslint: {
script: 'tslint -p test',
description: 'lint ts files',
},
},
test: {
default: {
script: concurrent.nps('lint', 'test.mocha'),
description: 'lint and run all tests',
},
mocha: {
script: 'mocha "test/**/*.test.ts"',
description: 'run all mocha tests',
},
},
ci: {
default: {
script: concurrent.nps(
'ci.mocha',
'ci.eslint',
'ci.tslint',
),
hiddenFromHelp: true,
},
mocha: {
default: {
script: series.nps('ci.mocha.test', 'ci.mocha.report'),
hiddenFromHelp: true,
},
test: {
script: series.nps('ci.mocha.nyc cross-env MOCHA_FILE="reports/mocha.xml" nps \\"test.mocha --reporter mocha-junit-reporter\\"'),
hiddenFromHelp: true,
},
report: {
script: series.nps('ci.mocha.nyc report --reporter text-lcov > coverage.lcov'),
hiddenFromHelp: true,
},
nyc: {
script: 'nyc --nycrc-path node_modules/@dxcli/dev-nyc-config/.nycrc',
hiddenFromHelp: true,
},
},
eslint: {
script: series.nps('lint.eslint --format junit --output-file reports/eslint.xml'),
hiddenFromHelp: true,
},
tslint: {
script: series.nps('lint.tslint --format junit > reports/tslint.xml'),
hiddenFromHelp: true,
},
release: {
script: 'yarn --frozen-lockfile && dxcli-dev-semantic-release',
hiddenFromHelp: true,
},
},
},
}
36 changes: 13 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "test helpers for dxcli components",
"version": "0.4.0",
"author": "Jeff Dickey @jdxcode",
"bugs": "/~https://github.com/dxcli/dev-test/issues",
"dependencies": {
"@dxcli/dev-nyc-config": "^0.0.3",
"@dxcli/engine": "^0.1.0",
Expand All @@ -21,51 +22,40 @@
"ts-node": "^4.1.0"
},
"devDependencies": {
"@dxcli/dev": "^1.1.3",
"@dxcli/dev-semantic-release": "^0.0.3",
"@dxcli/dev-test": "^0.4.0",
"@dxcli/dev-tslint": "^0.0.15",
"@dxcli/version": "^0.1.2",
"@types/node": "^9.3.0",
"@types/read-pkg": "^3.0.0",
"eslint": "^4.15.0",
"cross-env": "^5.1.3",
"eslint": "^4.16.0",
"eslint-config-dxcli": "^1.1.4",
"husky": "^0.14.3",
"mocha": "^5.0.0",
"nps": "^5.7.1",
"nps-utils": "^1.5.0",
"nyc": "^11.4.1",
"typescript": "^2.6.2"
},
"dxcli": {
"workflows": {
"test": [
"eslint .",
"tsc -p test --noEmit",
"tslint -p test",
"commitlint --from origin/master",
"mocha \"test/**/*.ts\""
],
"lint": [
"eslint .",
"tsc -p test --noEmit",
"tslint -p test",
"commitlint --from origin/master"
]
}
},
"engines": {
"node": ">=8.0.0"
},
"files": [
"/lib"
],
"homepage": "/~https://github.com/dxcli/dev-test",
"keywords": [
"dxcli"
],
"license": "MIT",
"main": "lib/index.js",
"repository": "dxcli/dev-test",
"scripts": {
"commitmsg": "dxcli-dev-commitmsg",
"lint": "dxcli-dev lint",
"precommit": "dxcli-dev test",
"prepare": "rm -rf lib && tsc",
"test": "dxcli-dev test"
"precommit": "nps lint",
"prepare": "nps build",
"test": "nps test"
},
"types": "lib/index.d.ts"
}
62 changes: 0 additions & 62 deletions scripts/circleci

This file was deleted.

2 changes: 2 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
--require source-map-support/register
--watch-extensions ts
--recursive
--reporter spec
--timeout 5000
3 changes: 2 additions & 1 deletion test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rootDir": ".."
},
"include": [
"**/*"
"../src/**/*",
"../test/**/*"
]
}
Loading

0 comments on commit 28b9e3b

Please sign in to comment.