name: Test
on: [pull_request]

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-latest", "windows-latest"]
    steps:
      - name: Get sources
        uses: actions/checkout@v1
        with:
          fetch-depth: 1

      - name: Restore npm cache
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - uses: actions/cache@v2
        with:
          path: node_modules
          key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-modules-

      - name: Install dependencies
        run: npm install

      - name: Build
        run: npm run build

      - name: Test
        run: npm test

      - name: Report coverage (Non-Windows)
        if: matrix.os == 'ubuntu-latest'
        uses: codecov/codecov-action@v1
        with:
          token: ${{secrets.CODECOV_TOKEN}}

name: Test
on: [pull_request]

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-latest", "windows-latest"]
    steps:
      - name: Get sources
        uses: actions/checkout@v1
        with:
          fetch-depth: 1

      - name: Setup Node.js
        uses: "actions/setup-node@v1"
        with:
          node-version: "14.x"
          registry-url: "https://registry.npmjs.org"

      - name: Setup npm
        run: npm i -g npm@7 --registry=https://registry.npmjs.org && echo npm --version

      - name: Restore npm cache
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - uses: actions/cache@v2
        with:
          path: node_modules
          key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-modules-

      - name: Install dependencies
        run: npm install

      - name: Build
        run: npm run build

      - name: Test
        run: npm test

      - name: Report coverage (Non-Windows)
        if: matrix.os == 'ubuntu-latest'
        uses: codecov/codecov-action@v1
        with:
          token: ${{secrets.CODECOV_TOKEN}}

Use Node.js@14 and npm@7 in 'Test' workflow
chore: Use Node.js@14 and npm@7 in 'Test' workflow
