From a0425a4b598703b6993527345253857868bd6ad9 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sat, 12 Aug 2023 12:19:28 +0800 Subject: [PATCH] chore: auto release on github action (#57) --- .autod.conf.js | 21 --------------------- .github/workflows/autoUnitTest.yml | 14 +++++++++----- .github/workflows/release.yml | 15 +++++++++++++++ README.md | 23 ++++++++++++++++------- package.json | 14 ++++---------- 5 files changed, 44 insertions(+), 43 deletions(-) delete mode 100644 .autod.conf.js create mode 100644 .github/workflows/release.yml diff --git a/.autod.conf.js b/.autod.conf.js deleted file mode 100644 index 1fd54be..0000000 --- a/.autod.conf.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -module.exports = { - write: true, - prefix: '^', - test: [ - 'test', - 'benchmark', - ], - devdep: [ - 'egg', - 'egg-bin', - 'autod', - 'eslint', - 'eslint-config-egg', - 'supertest', - ], - exclude: [ - './test/fixtures', - ], -}; diff --git a/.github/workflows/autoUnitTest.yml b/.github/workflows/autoUnitTest.yml index d100830..e33f89c 100644 --- a/.github/workflows/autoUnitTest.yml +++ b/.github/workflows/autoUnitTest.yml @@ -3,13 +3,15 @@ name: Run tests on: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [14.x, 16.x, 18.x, 20.x] mongodb-version: ['6.0'] steps: @@ -27,10 +29,12 @@ jobs: mongodb-version: ${{ matrix.mongodb-version }} - name: Install dependencies - run: npm i -g npminstall && npminstall + run: npm i - name: Run Unit Tests - run: npm run test-local - - - name: Upload coverage run: npm run ci + + - name: Code Coverage + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..66a6055 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,15 @@ +name: Release +on: + push: + branches: [ master ] + +jobs: + release: + name: Node.js + uses: node-modules/github-actions/.github/workflows/node-release.yml@master + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} + with: + checkTest: false + install: 'npm install --legacy-peer-deps --no-package-lock --no-fund' diff --git a/README.md b/README.md index bbbcf96..de8e77f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,15 @@ # egg-mongoose + [![NPM version][npm-image]][npm-url] -[![build status][travis-image]][travis-url] +[![Run tests](https://github.com/eggjs/egg-mongoose/actions/workflows/autoUnitTest.yml/badge.svg)](https://github.com/eggjs/egg-mongoose/actions/workflows/autoUnitTest.yml) [![Test coverage][codecov-image]][codecov-url] -[![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][download-url] [npm-image]: https://img.shields.io/npm/v/egg-mongoose.svg?style=flat-square [npm-url]: https://npmjs.org/package/egg-mongoose -[travis-image]: https://img.shields.io/travis/eggjs/egg-mongoose.svg?style=flat-square -[travis-url]: https://travis-ci.org/eggjs/egg-mongoose [codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-mongoose.svg?style=flat-square [codecov-url]: https://codecov.io/github/eggjs/egg-mongoose?branch=master -[david-image]: https://img.shields.io/david/eggjs/egg-mongoose.svg?style=flat-square -[david-url]: https://david-dm.org/eggjs/egg-mongoose [snyk-image]: https://snyk.io/test/npm/egg-mongoose/badge.svg?style=flat-square [snyk-url]: https://snyk.io/test/npm/egg-mongoose [download-image]: https://img.shields.io/npm/dm/egg-mongoose.svg?style=flat-square @@ -24,7 +20,7 @@ Egg's mongoose plugin. ## Install ```bash -$ npm i egg-mongoose --save +npm i egg-mongoose --save ``` ## Configuration @@ -178,3 +174,16 @@ If you are a contributor, follow [CONTRIBUTING](https://eggjs.org/zh-cn/contribu ## License [MIT](LICENSE) + + + +## Contributors + +|[
jtyjty99999](https://github.com/jtyjty99999)
|[
popomore](https://github.com/popomore)
|[
atian25](https://github.com/atian25)
|[
dead-horse](https://github.com/dead-horse)
|[
BaffinLee](https://github.com/BaffinLee)
|[
trylovetom](https://github.com/trylovetom)
| +| :---: | :---: | :---: | :---: | :---: | :---: | +|[
ChangedenCZD](https://github.com/ChangedenCZD)
|[
hardywu](https://github.com/hardywu)
|[
JasinYip](https://github.com/JasinYip)
|[
netputer](https://github.com/netputer)
|[
Wai-Dung](https://github.com/Wai-Dung)
|[
duncup](https://github.com/duncup)
| +[
jinasonlin](https://github.com/jinasonlin)
|[
legendecas](https://github.com/legendecas)
|[
lzqmyb](https://github.com/lzqmyb)
|[
DevXiaolan](https://github.com/DevXiaolan)
|[
villins](https://github.com/villins)
+ +This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Aug 12 2023 11:16:17 GMT+0800`. + + diff --git a/package.json b/package.json index 657d12e..35cf848 100644 --- a/package.json +++ b/package.json @@ -17,17 +17,15 @@ "mongoose": "^7.2.2" }, "devDependencies": { - "autod": "^3.1.2", "bluebird": "^3.5.1", "dotenv": "^7.0.0", "egg": "^3.16.0", "egg-bin": "^6.4.1", "egg-mock": "^5.10.7", - "eslint": "^5.15.3", - "eslint-config-egg": "^7.1.0", + "eslint": "^8.47.0", + "eslint-config-egg": "^12.2.1", "mocha": "^10.2.0", - "supertest": "^4.0.2", - "webstorm-disable-index": "^1.1.2" + "supertest": "^4.0.2" }, "engines": { "node": ">=14.0.0" @@ -38,7 +36,7 @@ "cov": "egg-bin cov", "lint": "eslint .", "ci": "npm run lint && npm run cov", - "autod": "autod" + "contributor": "git-contributor" }, "files": [ "index.js", @@ -49,9 +47,6 @@ "app", "lib" ], - "ci": { - "version": "14, 16, 18" - }, "repository": { "type": "git", "url": "git+https://github.com/eggjs/egg-mongoose.git" @@ -60,4 +55,3 @@ "url": "https://github.com/eggjs/egg/issues" } } -