Skip to content

Commit 5c633be

Browse files
authored
test: run test on github action (#127)
1 parent 0b14874 commit 5c633be

3 files changed

Lines changed: 54 additions & 14 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- master
11+
pull_request:
12+
branches:
13+
- main
14+
- master
15+
schedule:
16+
- cron: '0 2 * * *'
17+
18+
jobs:
19+
build:
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
node-version: [8, 10, 12, 14, 16]
26+
os: [ubuntu-latest, windows-latest, macos-latest]
27+
28+
steps:
29+
- name: Checkout Git Source
30+
uses: actions/checkout@v2
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
37+
- name: Install Dependencies
38+
run: npm i -g npminstall && npminstall
39+
40+
- name: Continuous Integration
41+
run: npm run ci
42+
43+
- name: Code Coverage
44+
uses: codecov/codecov-action@v1
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@
4545
"autod": "^3.1.0",
4646
"beautify-benchmark": "^0.2.4",
4747
"benchmark": "^2.1.4",
48+
"egg-ci": "^1.19.0",
4849
"git-contributor": "^1.0.10",
4950
"istanbul": "^0.4.5",
5051
"js-to-java": "^2.6.1",
5152
"jshint": "^2.10.2",
5253
"mm": "^2.5.0",
5354
"mocha": "^3.5.3"
5455
},
56+
"ci": {
57+
"type": "github",
58+
"os": {
59+
"github": "linux, windows, macos"
60+
},
61+
"version": "8, 10, 12, 14, 16"
62+
},
5563
"engines": {
5664
"node": ">= 0.12.0"
5765
}

0 commit comments

Comments
 (0)