Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit c6ec521

Browse files
authored
chore: add unit test coverage and enforcement (#522)
1 parent f06ec29 commit c6ec521

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.github/workflows/code-coverage.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
6+
name: Code Coverage Report
7+
8+
on: [push, pull_request]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2 # Check out your repository
15+
- run: yarn install # Install dependencies
16+
- run: yarn test --coverage # Run test
17+
- run: bash <(curl -s https://codecov.io/bash) # Upload to Codecov

codecov.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
coverage:
2+
round: down
3+
precision: 2
4+
range: '90...100'
5+
status:
6+
project:
7+
default:
8+
# basic
9+
target: 90%
10+
threshold: 0.1%
11+
# advanced settings
12+
if_ci_failed: error #success, failure, error, ignore
13+
informational: false
14+
only_pulls: false
15+
16+
comment:
17+
layout: 'reach,diff,flags,files,footer'
18+
behavior: default
19+
require_changes: no

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"ts",
102102
"js"
103103
],
104+
"collectCoverage": true,
104105
"coverageReporters": [
105106
"text",
106107
"html"

0 commit comments

Comments
 (0)