Skip to content

Commit

Permalink
test: run test on github action (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Jun 6, 2024
1 parent 38b36c9 commit 768ee6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: CI
name: Continuous Integration for 4.x

on:
push:
branches: [ master ]

branches: [ 4.x ]
pull_request:
branches: [ master ]
branches: [ 4.x ]

jobs:
Job:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
version: '12, 14, 16, 18, 20'
os: 'ubuntu-latest'
version: '12, 14, 16, 18, 20, 22'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# [**koa-bodyparser**](https://github.com/koajs/bodyparser)


[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Coveralls][coveralls-image]][coveralls-url]
[![David deps][david-image]][david-url]
[![Continuous Integration for 4.x](https://github.com/koajs/bodyparser/actions/workflows/nodejs.yml/badge.svg?branch=4.x)](https://github.com/koajs/bodyparser/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![node version][node-image]][node-url]

[npm-image]: https://img.shields.io/npm/v/koa-bodyparser.svg?style=flat-square
[npm-url]: https://npmjs.com/package/koa-bodyparser
[travis-image]: https://img.shields.io/travis/koajs/bodyparser.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/bodyparser
[coveralls-image]: https://img.shields.io/coveralls/koajs/bodyparser.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/bodyparser?branch=master
[david-image]: https://img.shields.io/david/koajs/bodyparser.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/bodyparser
[codecov-image]: https://codecov.io/github/koajs/bodyparser/coverage.svg?branch=4.x
[codecov-url]: https://codecov.io/github/koajs/bodyparser?branch=4.x
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "xo",
"lint:fix": "xo --fix",
"test": "mocha --require should test/*.spec.js --exit",
"coverage": "nyc npm run test --reporter=lcov",
"coverage": "nyc npm run test && nyc report --reporter lcov --report-dir coverage",
"ci": "npm run lint && npm run coverage"
},
"repository": {
Expand Down

0 comments on commit 768ee6b

Please sign in to comment.