name: Tests
on: push
jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: lts
      - name: Cache npm packages
        uses: actions/cache@v2
        with:
          path: ${{ github.workspace }}/node_modules
          key: ${{ runner.OS }}-node_modules-${{ hashFiles('package.json') }}
      - run: npm install
      - run: npm test
