Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
fix(ci): resolve missing test coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
kv979w committed Feb 9, 2021
1 parent f37a7ac commit a41dff8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
Expand All @@ -15,22 +15,21 @@ jobs:
node-version: [14.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm i

- name: Lint
run: npm run lint

- name: Unit Tests
run: npm run test

- name: Upload Unit Test Coverage
run: npx codecov

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm i

- name: Lint
run: npm run lint

- name: Unit Tests
run: npm run coverage

- name: Upload Unit Test Coverage
run: npx codecov
8 changes: 8 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"include": ["dist"],
"exclude": ["test/**/*"],
"extension": [".js", ".ts"],
"reporter": ["text", "html"],
"exclude-after-remap": false
}

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"pretest": "npm run clean && npm run build",
"test": "lb-mocha --allow-console-logs \"dist/test\"",
"posttest": "npm run lint",
"coverage": "lb-nyc npm run test && npm run nyc:report",
"nyc:report": "lb-nyc report --reporter=lcov",
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
"prepublishOnly": "npm run test",
"semantic-release": "semantic-release",
Expand Down

0 comments on commit a41dff8

Please sign in to comment.