name: CI

on: [push, pull_request]

jobs:
    build:
        strategy:
            matrix:
                platform: [ubuntu-latest, windows-latest]
                NODE_VERSION: [12.x, 14.x, 16.x, 17.x]
        runs-on: ${{ matrix.platform }}
        steps:
            - name: Checkout
              uses: actions/checkout@v2

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

            - name: Use Node.js ${{ env.NODE_VERSION }}
              uses: actions/setup-node@v2.1.2
              with:
                  node-version: ${{ env.NODE_VERSION }}

            - name: Install dependencies
              run: |
                  npm install

            - name: Run tests
              run: |
                  npm test

name: CI

on: [push, pull_request]

jobs:
    build:
        strategy:
            matrix:
                platform: [ubuntu-latest, windows-latest]
                node-version: [12.x, 14.x, 16.x, 17.x]
        runs-on: ${{ matrix.platform }}
        steps:
            - name: Checkout
              uses: actions/checkout@v2

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

            - name: Use Node.js ${{ env.node-version }}
              uses: actions/setup-node@v2.1.2
              with:
                  node-version: ${{ env.node-version }}

            - name: Install dependencies
              run: |
                  npm install

            - name: Run tests
              run: |
                  npm test

Tweak GitHub Actions workflow code style
Build: Tweak GitHub Actions workflow code style
