From 1c08a326067cbfde86c9a916080ef70522e8ee99 Mon Sep 17 00:00:00 2001 From: yndu13 Date: Wed, 13 Sep 2023 16:19:31 +0800 Subject: [PATCH] test: refine test workflow --- .github/workflows/ci.yml | 6 +++--- README-CN.md | 6 ++---- README.md | 6 ++---- package.json | 7 +++---- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e79af1a..9636487 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + node-version: [12.x, 14.x, 16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 @@ -27,4 +26,5 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run ci - - run: npm run test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/README-CN.md b/README-CN.md index 895ef63..46e767f 100644 --- a/README-CN.md +++ b/README-CN.md @@ -2,17 +2,15 @@ # Darabonba Python 生成器 -[![NPM version][npm-image]][npm-url] +[![CI](https://github.com/aliyun/darabonba-python-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/aliyun/darabonba-python-generator/actions/workflows/ci.yml) [![codecov][cov-image]][cov-url] -[![David deps][david-image]][david-url] +[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [npm-image]: https://img.shields.io/npm/v/@darabonba/python-generator.svg?style=flat-square [npm-url]: https://npmjs.org/package/@darabonba/python-generator [cov-image]: https://codecov.io/gh/aliyun/darabonba-python-generator/branch/master/graph/badge.svg [cov-url]: https://codecov.io/gh/aliyun/darabonba-python-generator -[david-image]: https://img.shields.io/david/aliyun/darabonba-python-generator.svg?style=flat-square -[david-url]: https://david-dm.org/aliyun/darabonba-python-generator [download-image]: https://img.shields.io/npm/dm/@darabonba/python-generator.svg?style=flat-square [download-url]: https://npmjs.org/package/@darabonba/python-generator diff --git a/README.md b/README.md index 1f8e315..3c6be31 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,15 @@ English | [简体中文](/README-CN.md) # Darabonba Python Generator -[![NPM version][npm-image]][npm-url] +[![CI](https://github.com/aliyun/darabonba-python-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/aliyun/darabonba-python-generator/actions/workflows/ci.yml) [![codecov][cov-image]][cov-url] -[![David deps][david-image]][david-url] +[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [npm-image]: https://img.shields.io/npm/v/@darabonba/python-generator.svg?style=flat-square [npm-url]: https://npmjs.org/package/@darabonba/python-generator [cov-image]: https://codecov.io/gh/aliyun/darabonba-python-generator/branch/master/graph/badge.svg [cov-url]: https://codecov.io/gh/aliyun/darabonba-python-generator -[david-image]: https://img.shields.io/david/aliyun/darabonba-python-generator.svg?style=flat-square -[david-url]: https://david-dm.org/aliyun/darabonba-python-generator [download-image]: https://img.shields.io/npm/dm/@darabonba/python-generator.svg?style=flat-square [download-url]: https://npmjs.org/package/@darabonba/python-generator diff --git a/package.json b/package.json index fc3f3db..5a41c8a 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ }, "scripts": { "lint": "eslint --fix src/", - "test": "mocha --reporter spec --timeout 3000 tests/*.tests.js", - "test-cov": "nyc -r=lcov -r=html -r=text -r=json mocha -t 3000 -R spec tests/*.tests.js", - "ci": "npm run lint && npm run test-cov && codecov" + "test": "mocha -R spec -t 3000 tests/*.tests.js", + "test-cov": "nyc -r=lcov -r=html -r=text -r=json npm run test", + "ci": "npm run lint && npm run test-cov" }, "repository": { "type": "git", @@ -18,7 +18,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "codecov": "^3.8.1", "eslint": "^7.14.0", "expect.js": "^0.3.1", "has-flag": "^4.0.0",