name: Run linters

on:
  push:
    branches:
      - 'master'
      - 'v*.*'
  pull_request:

jobs:
  lint:
    runs-on: ubuntu-18.04

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Use Node.js 10.x
        uses: actions/setup-node@v1
        with:
          node-version: "10.x"

      - name: Install npm dependencies
        run: npm ci

      - name: Eslint
        run: npm run lint:js

      - name: Stylelint
        run: npm run lint:sass

      - name: Check build
        run: npm run build

name: Run linters

on:
  push:
    branches:
      - 'master'
      - 'v*.*'
  pull_request:

jobs:
  lint:
    runs-on: ubuntu-18.04

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Use Node.js 14.x
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Install npm dependencies
        run: npm ci

      - name: Eslint
        run: npm run lint:js

      - name: Stylelint
        run: npm run lint:sass

  build:
    runs-on: ubuntu-18.04

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install npm dependencies
        run: npm ci --production

      - name: Check build
        run: npm run build

Test no various versions of Node.js
Test no various versions of Node.js
