test: Do "npm test" on GitHub Actions

This commit is contained in:
Takeshi KOMIYA 2020-11-05 01:33:00 +09:00
parent 15e6273a12
commit 6d522c5483
2 changed files with 21 additions and 11 deletions

21
.github/workflows/nodejs.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: CI (node.js)
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
node-version: 10.7
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}
- run: npm install
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
with:
run: npm test

View File

@ -1,11 +0,0 @@
os: linux
dist: xenial
language: node_js
node_js: '10.7'
services: xvfb
install:
- npm install
script:
- npm test