Add test and build actions

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
Yukai Huang 2021-06-10 12:22:04 +08:00
parent 8c20d9f625
commit 34f502c166
No known key found for this signature in database
GPG Key ID: D4D3B2F0E99D4914
1 changed files with 28 additions and 0 deletions

28
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: 'Test and Build'
on:
push:
pull_request:
workflow_dispatch:
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
check-latest: true
- run: npm ci
- run: npm run test:ci
- run: npm run build