未验证 提交 9aed8210 编写于 作者: A a632079

build: support github actions

上级 da7a535c
name: Node.js CI
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
name: Install dependencies
- name: Test
run: npm test
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
name: Install dependencies
- name: Lint
run: npm lint
\ No newline at end of file
......@@ -5,7 +5,8 @@
"scripts": {
"start": "node app.js",
"test": "mocha -r intelli-espower-loader -t 20000 app.test.js --exit",
"lint-fix": "eslint --fix --ext .js app.js module/ util/ test/ "
"lint": "eslint **/*.{js,ts}",
"lint-fix": "eslint --fix **/*.{js,ts}"
},
"keywords": [
"网易云音乐",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册