Skip to content

Commit

Permalink
test: run ci on GitHub Action (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Jan 3, 2023
1 parent 878669e commit df2d28f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node.js CI

on:
push:
branch: master
pull_request:
branch: master

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8, 10, 12, 14, 16, 18]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run ci
- run: npx codecov
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

21 changes: 2 additions & 19 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
# koa-session

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![iojs version][iojs-image]][iojs-url]
[![node version][node-image]][node-url]
[![Node.js CI](https://github.com/koajs/session/actions/workflows/nodejs.yml/badge.svg)](https://github.com/koajs/session/actions/workflows/nodejs.yml)
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/koa-session.svg?style=flat-square
[npm-url]: https://npmjs.org/package/koa-session
[travis-image]: https://img.shields.io/travis/koajs/session.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/session
[coveralls-image]: https://img.shields.io/coveralls/koajs/session.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/session?branch=master
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/koajs/session.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/session
[iojs-image]: https://img.shields.io/badge/io.js-%3E=_1.0-yellow.svg?style=flat-square
[iojs-url]: http://iojs.org/
[node-image]: https://img.shields.io/badge/node.js-%3E=_7.6-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/koa-session.svg?style=flat-square
[download-url]: https://npmjs.org/package/koa-session

Simple session middleware for Koa. Defaults to cookie-based sessions and supports external stores.

*Requires Node 7.6 or greater for async/await support*
*Requires Node 8.0.0 or greater for async/await support*

## Installation

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"uuid": "^8.3.2"
},
"engines": {
"node": ">=7.6"
"node": ">=8.0.0"
},
"scripts": {
"test": "npm run lint && NODE_ENV=test mocha --exit --require should --reporter spec test/*.test.js",
"test-cov": "NODE_ENV=test node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --exit --require should test/*.test.js",
"test-travis": "npm run lint && NODE_ENV=test node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --exit --require should test/*.test.js",
"ci": "npm run lint && NODE_ENV=test node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --exit --require should test/*.test.js",
"lint": "eslint lib test index.js"
}
}

0 comments on commit df2d28f

Please sign in to comment.