seperate lint and test step

This commit is contained in:
u9g 2021-12-10 15:38:41 -05:00
parent 10a33f034b
commit 404410db4c
2 changed files with 16 additions and 2 deletions

View file

@ -9,11 +9,24 @@ on:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: npm install
- name: Run lint
run: npm run lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
mcVersion: ['1.7', '1.8', '1.9', '1.10', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17', '1.17.1']
fail-fast: false
steps:
- uses: actions/checkout@v2
@ -29,4 +42,4 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test -- -g ${{ matrix.mcVersion }}
run: npm mocha_test -- -g ${{ matrix.mcVersion }}

View file

@ -9,7 +9,8 @@
"url": "git://github.com/PrismarineJS/node-minecraft-protocol.git"
},
"scripts": {
"test": "mocha --recursive --reporter spec --exit",
"mocha_test": "mocha --recursive --reporter spec --exit",
"test": "npm run mocha_test",
"lint": "standard",
"fix": "standard --fix",
"pretest": "npm run lint",