chore(*): fix code coverage not uploaded (#9661)

Signed-off-by: Rongrong <i@rong.moe>
This commit is contained in:
Rongrong 2022-04-30 07:37:23 +08:00 committed by GitHub
parent 78a5ce1922
commit 72070d40cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 7 deletions

View File

@ -25,13 +25,14 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn
- run: npm run jest
- run: npm run jest:coverage
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- name: Upload coverage to Codecov
if: ${{ matrix.node-version == '16' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
docs:
runs-on: ubuntu-latest

View File

@ -9,6 +9,7 @@
[![npm publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/publish/master?label=npm%20publish&logo=npm&style=flat-square)](https://www.npmjs.com/package/rsshub)
[![docker publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/%5Bdocker%5D%20CI%20for%20releases/master?label=docker%20publish&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub)
[![test](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/test/master?label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster)
[![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://codecov.io/github/DIYgod/RSSHub?branch=master)
## Introduction

View File

@ -15,6 +15,7 @@ sidebarDepth: 0
[![npm publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/publish/master?label=npm%20publish\&logo=npm\&style=flat-square)](https://www.npmjs.com/package/rsshub)
[![docker publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/%5Bdocker%5D%20CI%20for%20releases/master?label=docker%20publish\&logo=docker\&style=flat-square)](https://hub.docker.com/r/diygod/rsshub)
[![test](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/test/master?label=test\&logo=github\&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster)
[![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square\&logo=codecov)](https://codecov.io/github/DIYgod/RSSHub?branch=master)
RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以给任何奇奇怪怪的内容生成 RSS 订阅源。RSSHub 借助于开源社区的力量快速发展中,目前已适配数百家网站的上千项内容

View File

@ -15,6 +15,7 @@ sidebarDepth: 0
[![npm publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/publish/master?label=npm%20publish&logo=npm&style=flat-square)](https://www.npmjs.com/package/rsshub)
[![docker publish](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/%5Bdocker%5D%20CI%20for%20releases/master?label=docker%20publish&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub)
[![test](https://img.shields.io/github/workflow/status/DIYgod/RSSHub/test/master?label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster)
[![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://codecov.io/github/DIYgod/RSSHub?branch=master)
RSSHub is an open source, easy to use, and extensible RSS feed aggregator, it's capable of generating RSS feeds from pretty much everything.

View File

@ -19,9 +19,10 @@
"format": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js && prettier \"**/*.{js,json}\" --write",
"format:staged": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js --staged && pretty-quick --staged --verbose --pattern \"**/*.{js,json}\"",
"format:check": "eslint \"**/*.{js,yml}\" && prettier-check \"**/*.{js,json}\"",
"test": "npm run format:check && cross-env NODE_ENV=test jest --coverage --runInBand --forceExit",
"jest": "cross-env NODE_ENV=test jest --runInBand --forceExit",
"jest:watch": "cross-env NODE_ENV=test jest --watch"
"jest": "cross-env NODE_ENV=test jest --runInBand --forceExit --detectOpenHandles",
"jest:coverage": "cross-env NODE_ENV=test jest --coverage --runInBand --forceExit --detectOpenHandles",
"jest:watch": "cross-env NODE_ENV=test jest --watch",
"test": "npm run format:check && npm run jest:coverage"
},
"repository": {
"type": "git",
@ -148,7 +149,9 @@
],
"collectCoverageFrom": [
"lib/**/*.js",
"!lib/routes/**/*.js"
"!lib/routes/**/*.js",
"!lib/v2/**/*.js",
"!lib/radar-rules.js"
],
"bail": true,
"testEnvironment": "node",