name: Node.js CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-20.04
    timeout-minutes: 15

    steps:
      - uses: actions/checkout@v2

      - uses: actions/cache@v1
        with:
          path: node_modules
          key: node_modules-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            node_modules-

      - name: npm install
        run: npm install

      - name: run unittest
        run: |
          npm test
