This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Showing
8 changed files
with
477 additions
and
183 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
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,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 |
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,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: 'MOCHA_FILE="reports/mocha.xml" nps "ci.mocha.nyc 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: 'dxcli-dev-semantic-release', | ||
hiddenFromHelp: true, | ||
}, | ||
}, | ||
}, | ||
} |
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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
--require test/helpers/init.js | ||
--require ts-node/register | ||
--require source-map-support/register | ||
--watch-extensions ts--recursive | ||
--watch-extensions ts | ||
--recursive | ||
--reporter spec | ||
--timeout 5000 |
Oops, something went wrong.