Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create jest-coverage.yml #18

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions .github/workflows/jest-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: jest-coverage
run-name: ${{ github.actor }}
on: ["push", "pull_request"]

run-name: ${{ github.actor }} update coverage data
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
upload-coverage:
name: upload-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: npm install, make jest-coverage
run: |
npm install
npm run test:coverage

- name: Coveralls
uses: coverallsapp/github-action@v2
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Coveralls
uses: coverallsapp/github-action@v2
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## 生成文件
dist
/_*
coverage
!__tests__

## lock 文件
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![NPM version][npm-image]][npm-url]
![](https://img.shields.io/badge/build-passing-green)
[![Coverage Status](https://coveralls.io/repos/github/beezen/nucm/badge.svg?branch=feature-action)](https://coveralls.io/github/beezen/nucm?branch=feature-action)

`nucm` can help you manage NPM account information quickly and easily.

Expand Down
1 change: 1 addition & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![NPM version][npm-image]][npm-url]
![](https://img.shields.io/badge/build-passing-green)
[![Coverage Status](https://coveralls.io/repos/github/beezen/nucm/badge.svg?branch=feature-action)](https://coveralls.io/github/beezen/nucm?branch=feature-action)

`nucm` 能帮你快速轻松地管理 NPM 账户信息。

Expand Down
155 changes: 155 additions & 0 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1704261161194" clover="3.2.0">
<project timestamp="1704261161194" name="All files">
<metrics statements="122" coveredstatements="112" conditionals="66" coveredconditionals="50" methods="18" coveredmethods="18" elements="206" coveredelements="180" complexity="0" loc="122" ncloc="122" packages="4" files="5" classes="5"/>
<package name="actions">
<metrics statements="55" coveredstatements="50" conditionals="27" coveredconditionals="18" methods="8" coveredmethods="8"/>
<file name="base.js" path="/Users/beezen/mine/github/nucm/src/actions/base.js">
<metrics statements="55" coveredstatements="50" conditionals="27" coveredconditionals="18" methods="8" coveredmethods="8"/>
<line num="9" count="2" type="stmt"/>
<line num="10" count="2" type="stmt"/>
<line num="11" count="2" type="stmt"/>
<line num="12" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="13" count="4" type="stmt"/>
<line num="15" count="8" type="cond" truecount="1" falsecount="1"/>
<line num="18" count="8" type="cond" truecount="2" falsecount="0"/>
<line num="19" count="4" type="stmt"/>
<line num="21" count="4" type="stmt"/>
<line num="25" count="2" type="stmt"/>
<line num="26" count="2" type="stmt"/>
<line num="29" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="30" count="1" type="stmt"/>
<line num="31" count="1" type="stmt"/>
<line num="34" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="37" count="3" type="stmt"/>
<line num="40" count="1" type="stmt"/>
<line num="42" count="1" type="stmt"/>
<line num="43" count="1" type="stmt"/>
<line num="44" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="46" count="2" type="stmt"/>
<line num="51" count="2" type="stmt"/>
<line num="52" count="2" type="stmt"/>
<line num="53" count="2" type="stmt"/>
<line num="54" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="55" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="56" count="0" type="stmt"/>
<line num="57" count="0" type="stmt"/>
<line num="59" count="2" type="stmt"/>
<line num="61" count="2" type="stmt"/>
<line num="62" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="63" count="1" type="stmt"/>
<line num="66" count="2" type="stmt"/>
<line num="67" count="2" type="stmt"/>
<line num="68" count="2" type="stmt"/>
<line num="69" count="2" type="stmt"/>
<line num="74" count="2" type="stmt"/>
<line num="75" count="2" type="stmt"/>
<line num="76" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="77" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="78" count="2" type="stmt"/>
<line num="79" count="2" type="stmt"/>
<line num="80" count="2" type="stmt"/>
<line num="81" count="2" type="stmt"/>
<line num="82" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="84" count="0" type="stmt"/>
<line num="90" count="2" type="stmt"/>
<line num="91" count="2" type="stmt"/>
<line num="92" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="93" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="94" count="0" type="stmt"/>
<line num="95" count="0" type="stmt"/>
<line num="97" count="2" type="stmt"/>
<line num="98" count="2" type="stmt"/>
<line num="99" count="2" type="stmt"/>
</file>
</package>
<package name="common">
<metrics statements="48" coveredstatements="43" conditionals="31" coveredconditionals="24" methods="7" coveredmethods="7"/>
<file name="env.js" path="/Users/beezen/mine/github/nucm/src/common/env.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="1" count="2" type="stmt"/>
<line num="9" count="2" type="stmt"/>
</file>
<file name="index.js" path="/Users/beezen/mine/github/nucm/src/common/index.js">
<metrics statements="46" coveredstatements="41" conditionals="31" coveredconditionals="24" methods="7" coveredmethods="7"/>
<line num="11" count="2" type="stmt"/>
<line num="12" count="2" type="stmt"/>
<line num="13" count="2" type="stmt"/>
<line num="14" count="2" type="stmt"/>
<line num="22" count="8" type="cond" truecount="3" falsecount="1"/>
<line num="23" count="8" type="stmt"/>
<line num="28" count="8" type="stmt"/>
<line num="33" count="8" type="stmt"/>
<line num="34" count="8" type="stmt"/>
<line num="35" count="8" type="stmt"/>
<line num="36" count="8" type="cond" truecount="1" falsecount="1"/>
<line num="37" count="8" type="stmt"/>
<line num="39" count="8" type="stmt"/>
<line num="51" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="52" count="0" type="stmt"/>
<line num="53" count="0" type="stmt"/>
<line num="55" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="56" count="0" type="stmt"/>
<line num="62" count="0" type="stmt"/>
<line num="63" count="0" type="stmt"/>
<line num="65" count="1" type="stmt"/>
<line num="74" count="11" type="cond" truecount="3" falsecount="0"/>
<line num="75" count="11" type="stmt"/>
<line num="84" count="5" type="stmt"/>
<line num="85" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="86" count="4" type="stmt"/>
<line num="87" count="4" type="stmt"/>
<line num="88" count="4" type="stmt"/>
<line num="91" count="4" type="stmt"/>
<line num="92" count="4" type="cond" truecount="3" falsecount="1"/>
<line num="94" count="4" type="stmt"/>
<line num="97" count="4" type="stmt"/>
<line num="98" count="48" type="stmt"/>
<line num="99" count="48" type="cond" truecount="2" falsecount="0"/>
<line num="100" count="4" type="stmt"/>
<line num="103" count="4" type="stmt"/>
<line num="115" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="116" count="1" type="stmt"/>
<line num="117" count="1" type="stmt"/>
<line num="119" count="2" type="stmt"/>
<line num="127" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="128" count="1" type="stmt"/>
<line num="129" count="1" type="stmt"/>
<line num="130" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="132" count="1" type="stmt"/>
<line num="137" count="1" type="cond" truecount="2" falsecount="0"/>
</file>
</package>
<package name="lang">
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<file name="index.js" path="/Users/beezen/mine/github/nucm/src/lang/index.js">
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
</file>
</package>
<package name="utils">
<metrics statements="19" coveredstatements="19" conditionals="8" coveredconditionals="8" methods="3" coveredmethods="3"/>
<file name="index.js" path="/Users/beezen/mine/github/nucm/src/utils/index.js">
<metrics statements="19" coveredstatements="19" conditionals="8" coveredconditionals="8" methods="3" coveredmethods="3"/>
<line num="8" count="11" type="stmt"/>
<line num="17" count="11" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="19" count="8" type="stmt"/>
<line num="29" count="7" type="stmt"/>
<line num="30" count="7" type="stmt"/>
<line num="31" count="7" type="stmt"/>
<line num="33" count="7" type="stmt"/>
<line num="34" count="1" type="stmt"/>
<line num="36" count="7" type="stmt"/>
<line num="37" count="3" type="stmt"/>
<line num="40" count="7" type="stmt"/>
<line num="41" count="16" type="stmt"/>
<line num="42" count="16" type="stmt"/>
<line num="44" count="16" type="cond" truecount="2" falsecount="0"/>
<line num="45" count="3" type="stmt"/>
<line num="46" count="13" type="cond" truecount="2" falsecount="0"/>
<line num="47" count="2" type="stmt"/>
<line num="50" count="2" type="stmt"/>
</file>
</package>
</project>
</coverage>
6 changes: 6 additions & 0 deletions coverage/coverage-final.json

Large diffs are not rendered by default.

Loading