Skip to content

Commit

Permalink
build: add code coverage and integration tests (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Nov 14, 2021
1 parent 57ed90c commit ca3c887
Show file tree
Hide file tree
Showing 5 changed files with 450 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches:
- main
pull_request:
types: [ assigned, opened, synchronize, reopened, labeled ]
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm install --engine-strict
- run: npm test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
- run: npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
- run: npm run coverage
9 changes: 9 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"reporter": [
"html",
"text"
],
"lines": 95,
"branches": "80",
"statements": "95"
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- omit in toc -->
# parseArgs

[![Coverage][coverage-image]][coverage-url]

>
> 🚨 THIS REPO IS AN EARLY WIP -- DO NOT USE ... yet 🚨
>
Expand Down Expand Up @@ -194,3 +196,6 @@ positionals // ['b']
- the second flag would be parsed as `'foo'`
- Is `-` a positional? ie, `bash some-test.sh | tap -`
- no

[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs
[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc
Loading

0 comments on commit ca3c887

Please sign in to comment.