mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
build: support github actions
This commit is contained in:
parent
da7a535cc6
commit
9aed821057
52
.github/node.js.yml
vendored
Normal file
52
.github/node.js.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
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
|
@ -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": [
|
||||
"网易云音乐",
|
||||
|
Loading…
x
Reference in New Issue
Block a user