Switch from Travis to Github Actions

Split lint and qunit tests into different workflows
This commit is contained in:
Niklas Laxström
2020-12-23 10:48:18 +02:00
parent d7dc460db4
commit e43746f77d
4 changed files with 51 additions and 5 deletions

24
.github/workflows/node-lint.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Lint
on:
[pull_request, push]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [ '10, '14' ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install package.json dependencies
run: npm install
- name: Run linting
run: npm run lint

24
.github/workflows/node-test.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Test
on:
[pull_request, push]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [ '10', '14' ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install package.json dependencies
run: npm install
- name: Run QUnit test suite
run: npm run qunit

View File

@@ -1,4 +0,0 @@
language: node_js
node_js:
- 8
sudo: false

View File

@@ -44,6 +44,8 @@
},
"license": "(MIT OR GPL-2.0+)",
"scripts": {
"test": "grunt test --verbose"
"test": "grunt test --verbose",
"lint": "grunt lint --verbose",
"qunit": "grunt qunit --verbose"
}
}