Skip to content

Commit

Permalink
使用Actions进行单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
MoshiCoCo committed Oct 28, 2020
1 parent 615d523 commit 5770e9c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/unitTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Unit_Test

on:
push:
branches:
- master
paths:
- "src/*"
pull_request:
branches:
- master
paths:
- "src/*"

jobs:
build-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Package with Node
run: |
npm ci
npm test

0 comments on commit 5770e9c

Please sign in to comment.