Skip to content

Commit 223fc0f

Browse files
greenkeeper[bot]gregswindle
authored andcommitted
ci(drift): enable automated dep updates
Given my familiarity with greenkeeper, I'm keeping it around. I really like @dependabot's rich automated merge features (including squash and merge), however. Closes #3
1 parent 36a4853 commit 223fc0f

File tree

4 files changed

+1193
-1141
lines changed

4 files changed

+1193
-1141
lines changed

.travis.yml

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,97 @@
1+
# 1. Set-up
12
env:
2-
global:
3-
CC_TEST_REPORTER_ID="$CC_TEST_REPORTER_ID"
4-
CC_TEST_REPORTER_TYPE=
3+
global: CC_TEST_REPORTER_ID="$CC_TEST_REPORTER_ID" CC_TEST_REPORTER_TYPE=
54

65
language: node_js
6+
7+
cache: npm
8+
9+
# 1.1. Run quality assurance (QA) gates on all
10+
# supported Node.js versions...
711
node_js:
8-
- v11
9-
- v10
10-
- v8
11-
- v6
12+
- "11"
13+
- "10"
14+
- "8"
15+
- "6"
1216

17+
# 1.2. ...on both Linux and MacOS
18+
# @see https://github.com/nodejs/Release#release-schedule
1319
os:
1420
- linux
1521
- osx
1622

23+
# 1.3. Do a shallow-clone to speed up analysis
24+
# (fail fast!)
1725
git:
1826
depth: 1
1927

2028
before_install:
21-
# npm
22-
- "[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest"
23-
# FOSSA: install fossa-cli to run Provided Builds
24-
# @see https://docs.fossa.com/docs/provided-builds
29+
# 2. Before installation (before_install) steps:
30+
31+
# 2.1. Set up dependency manager (node package manager "npm")
32+
- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest'
33+
# 2.2. FOSS license-compliance evaluator (fossa-cli for Provided Builds)
34+
# Grant execution permission
35+
# @see https://docs.fossa.com/docs/provided-builds
2536
- chmod +x ./.github/ci/legal/fossa-init.sh
37+
38+
# 2.3. CodeClimate source code quality assessor
39+
# Grant execution permission
2640
- chmod +x ./.github/ci/qa/code-climate-init.sh
2741

2842
install:
43+
# 3. Installation step (install):
2944
- npm i
3045

3146
before_script:
47+
# 4. Before running unit tests...
48+
# 4.1. Initialize FOSSA for OSS license compliance evaluation
3249
- ./.github/ci/legal/fossa-init.sh
50+
51+
# 4.2. Initialize CodeClimate for quality assurance code review
52+
# automatically sent as comments during a Merge Request
53+
# to master.
3354
- ./.github/ci/qa/code-climate-init.sh
55+
56+
# 4.3. Initialize CodeClimate Code Coverage reporter
3457
- $TRAVIS_BUILD_DIR/cc-test-reporter before-build || exit 0
3558

3659
script:
60+
# 5. Test!
3761
- npm test
62+
- npm run security:audit:dependencies
3863

3964
after_script:
40-
- npm run ci:coverage:codacy
41-
- npm run ci:coverage:coveralls
42-
- $TRAVIS_BUILD_DIR/cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || exit 0
65+
# 5.1. Share code coverage with
66+
# - Codacy,
67+
# - Coveralls,
68+
- npm run ci:coverage
69+
70+
# - and CodeClimate
71+
- $TRAVIS_BUILD_DIR/cc-test-reporter after-build --exit-code
72+
$TRAVIS_TEST_RESULT || exit 0
4373

4474
jobs:
4575
include:
4676
- stage: release
77+
name: 'Publish to NPM (public registry)'
78+
# 7. Deploy from the lastest Node.js Long-Term Support
79+
# (LTS) build.
4780
node_js: lts/*
4881
deploy:
4982
provider: script
5083
skip_cleanup: true
5184
script:
52-
- npx travis-deploy-once "npx semantic-release"
85+
# 7.1. Bump semantic version by commit message headers' "type"
86+
# 7.2. Generate GitHub Release Notes
87+
# 7.3. Append change list to the CHANGELOG.md
88+
# 7.4. Bump package.json#version
89+
# 7.5. Stage and commit all of the above
90+
# 7.6. Push to Git remote origin master
91+
# 7.7. Trigger all CI quality gates on master
92+
# 7.8. All gates pass (steps 1-6)? Bump semver and
93+
# 7.8.1. Squash and merge into origin/master
94+
# 7.8.2. Publish a GitHub release with notes and CHANGELOG
95+
# 7.8.3. Publish on NPM (including README)
96+
# 7.9. Any gate fails? Roll back and abort all release steps.
97+
- npx semantic-release

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Code Climate](https://img.shields.io/codeclimate/coverage/github/gregswindle/parse-numeric.svg?style=flat-square)]()
1414
[![Codacy code quality][codacy-image]][codacy-url]
1515

16-
> Convert numeric strings into Numbers (or return original value).
16+
> Convert numeric strings into Numbers (or return the original value).
1717
1818
## Table of Contents
1919

@@ -24,15 +24,21 @@
2424
- [5. Contributing](#5-contributing)
2525
- [6. License](#6-license)
2626

27-
## Install
27+
## 1. Install
2828

2929
```sh
3030
npm i parse-numeric
3131
```
3232

3333
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>
3434

35-
## Usage
35+
## 2. Usage
36+
37+
<a href="https://runkit.com/gregswindle/5c60901fae871f00140ef424"><img alt="Test it out on RunKit.com" height="30" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/beaker.svg" valign="bottom" width="30">
38+
Test <strong>parse-numeric</strong> in your Web browser on RunKit
39+
<img alt="Try parse-numeric on RunKit" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/link-external.svg"></a>.
40+
41+
---
3642

3743
Pass any `String` of [valid JavaScript `Number` notation
3844
![Read more on the Mozilla Developer Network][octicon-link-external]][mdn-numbers-url]
@@ -58,8 +64,6 @@ to return either an **integer** or **floating point** `Number`.
5864
![Read more on the Mozilla Developer Network][octicon-link-external]][mdn-binary-numbers]
5965

6066
```js
61-
const parseNumeric = require("parse-numeric");
62-
6367
parseNumeric("0b11");
6468
// 0b11 => 3
6569
```
@@ -107,43 +111,45 @@ parseNumeric(undefined);
107111

108112
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>
109113

110-
## API
114+
## 3. API
111115

112-
### `parseNumeric`
116+
### 3.1. `parseNumeric`
113117

114118
A function that will return either a `Number` or the original value.
115119

116-
### `parseNumeric.isNumeric`
120+
### 3.2. `parseNumeric.isNumeric`
117121

118122
A convenience function that evaluates whether a value could be numeric.
119123

120124
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>
121125

122-
## Maintainers
126+
## 4. Maintainers
123127

124128
![Maintenance][maintenance-image]
125129

126130
[@gregswindle](https://github.com/gregswindle)
127131

128132
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>
129133

130-
## Contributing
134+
## 5. Contributing
131135

132136
[![GitHub Contributors](https://img.shields.io/github/contributors/gregswindle/parse-numeric.svg?style=social)]()
133137
[![GitHub](https://img.shields.io/github/stars/gregswindle/parse-numeric.svg?style=social)](https://github.com/gregswindle/parse-numeric)
134138
[![GitHub](https://img.shields.io/github/forks/gregswindle/parse-numeric.svg?style=social)](https://github.com/gregswindle/parse-numeric/network)
139+
[![Greenkeeper badge](https://badges.greenkeeper.io/gregswindle/parse-numeric.svg?style=flat-square)](https://greenkeeper.io/)
135140

136141
> ![Gratitude][octicon-heart] We gratefully accept Pull Requests.
137142
138-
Please review [the CONTRIBUTING guidelines](CONTRIBUTING.md) for more
139-
information.
143+
Please review [the CONTRIBUTING guidelines](CONTRIBUTING.md) and join in.
140144

141145
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>
142146

143-
## License
147+
## 6. License
144148

145149
[MIT](LICENSE) © [Greg Swindle](https://github.com/gregswindle)
146150

151+
> [![Law][octicon-law] View current and **detailed legal NOTICE** report](https://app.fossa.io/attribution/933e5a8d-8842-42f1-8f35-ede2de2bfe69).
152+
147153
[![FOSSA Status](https://app.fossa.io/api/projects/custom%2B804%2Fgithub.com%2Fgregswindle%2Fparse-numeric.svg?type=large)](https://app.fossa.io/projects/custom%2B804%2Fgithub.com%2Fgregswindle%2Fparse-numeric?ref=badge_large)
148154

149155
<small>[![Back to Table of contents][octicon-triangle-up] [toc]](#table-of-contents)</small>

0 commit comments

Comments
 (0)