Skip to content

Commit

Permalink
chore: drop Node.js 10.x & migrate travisCI to GitHub Actions (#49)
Browse files Browse the repository at this point in the history
* chore(ci): migrate travisCI to GitHub Actions

* chore: update .gitignore

* chore: drop Node.js 10.x

* chore: fix npm script for send coverage report
  • Loading branch information
yoshinorin committed Aug 22, 2021
1 parent 87ed40b commit b47bf29
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Linter

on: [push, pull_request]

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install Dependencies
run: npm install
- name: Lint
run: |
npm run eslint
env:
CI: true
46 changes: 46 additions & 0 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Tester

on: [push, pull_request]

jobs:
tester:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['12.x', '14.x', '16.x']
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Test
run: npm test -- --no-parallel
env:
CI: true
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: ['14.x']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Coverage
run: npm run test-cov
env:
CI: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tmp/
*.log
.idea/
.nyc_output/
coverage/
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hexo-pagination

[![Build Status](https://travis-ci.org/hexojs/hexo-pagination.svg?branch=master)](https://travis-ci.org/hexojs/hexo-pagination)
[![Build Status](https://github.com/hexojs/hexo-pagination/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-pagination/actions?query=workflow%3ATester)
[![NPM version](https://badge.fury.io/js/hexo-pagination.svg)](https://www.npmjs.com/package/hexo-pagination)
[![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-pagination.svg)](https://coveralls.io/r/hexojs/hexo-pagination?branch=master)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"eslint": "eslint .",
"test": "mocha test/index.js",
"test-cov": "nyc npm run test"
"test-cov": "nyc --reporter=lcovonly npm run test"
},
"directories": {
"lib": "./lib"
Expand All @@ -31,6 +31,6 @@
"nyc": "^15.0.0"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.4.0"
}
}

0 comments on commit b47bf29

Please sign in to comment.