Skip to content

Commit 67db367

Browse files
authoredAug 20, 2021
chore: drop Node.js 10.x & migrate from travis to GitHub Actions (#53)
* chore(ci): migrate from travis ci to github actions * chore: update ci badge * chore: drop node 10.x
1 parent 8a1d6c2 commit 67db367

File tree

5 files changed

+87
-23
lines changed

5 files changed

+87
-23
lines changed
 

‎.github/workflows/linter.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Linter
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
linter:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Use Node.js 12.x
11+
uses: actions/setup-node@v2
12+
with:
13+
node-version: '12.x'
14+
- name: Cache NPM dependencies
15+
uses: actions/cache@v2
16+
with:
17+
path: node_modules
18+
key: ${{ runner.OS }}-npm-cache
19+
restore-keys: |
20+
${{ runner.OS }}-npm-cache
21+
- name: Install Dependencies
22+
run: npm install
23+
- name: Lint
24+
run: |
25+
npm run eslint
26+
env:
27+
CI: true

‎.github/workflows/tester.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Tester
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tester:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
node-version: ['12.x', '14.x', '16.x']
12+
fail-fast: false
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: Cache NPM dependencies
20+
uses: actions/cache@v1
21+
with:
22+
path: node_modules
23+
key: ${{ runner.os }}-npm-cache
24+
restore-keys: ${{ runner.os }}-npm-cache
25+
- name: Install Dependencies
26+
run: npm install
27+
- name: Test
28+
run: npm run test
29+
env:
30+
CI: true
31+
coverage:
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
matrix:
35+
os: [ubuntu-latest]
36+
node-version: ['12.x']
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Use Node.js ${{ matrix.node-version }}
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
- name: Cache NPM dependencies
44+
uses: actions/cache@v2
45+
with:
46+
path: node_modules
47+
key: ${{ runner.os }}-npm-cache
48+
restore-keys: ${{ runner.os }}-npm-cache
49+
- name: Install Dependencies
50+
run: npm install
51+
- name: Coverage
52+
run: npm run test-cov
53+
env:
54+
CI: true
55+
- name: Coveralls
56+
uses: coverallsapp/github-action@master
57+
with:
58+
github-token: ${{ secrets.github_token }}

‎.travis.yml

-21
This file was deleted.

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# hexo-log
22

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

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@
4242
"sinon": "^10.0.1"
4343
},
4444
"engines": {
45-
"node": ">=10.13.0"
45+
"node": ">=12.4.0"
4646
}
4747
}

0 commit comments

Comments
 (0)
Please sign in to comment.