Skip to content

Commit ca3c887

Browse files
author
Benjamin E. Coe
authored
build: add code coverage and integration tests (#16)
1 parent 57ed90c commit ca3c887

File tree

5 files changed

+450
-1
lines changed

5 files changed

+450
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
types: [ assigned, opened, synchronize, reopened, labeled ]
7+
name: ci
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node: [16]
14+
steps:
15+
- uses: actions/checkout@v1
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node }}
19+
- run: node --version
20+
- run: npm install --engine-strict
21+
- run: npm test
22+
windows:
23+
runs-on: windows-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 16
29+
- run: npm install
30+
- run: npm test
31+
coverage:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: actions/setup-node@v1
36+
with:
37+
node-version: 16
38+
- run: npm install
39+
- run: npm run coverage

.nycrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"reporter": [
3+
"html",
4+
"text"
5+
],
6+
"lines": 95,
7+
"branches": "80",
8+
"statements": "95"
9+
}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- omit in toc -->
22
# parseArgs
33

4+
[![Coverage][coverage-image]][coverage-url]
5+
46
>
57
> 🚨 THIS REPO IS AN EARLY WIP -- DO NOT USE ... yet 🚨
68
>
@@ -194,3 +196,6 @@ positionals // ['b']
194196
- the second flag would be parsed as `'foo'`
195197
- Is `-` a positional? ie, `bash some-test.sh | tap -`
196198
- no
199+
200+
[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs
201+
[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc

0 commit comments

Comments
 (0)