name: lint & test

on:
  push:
    paths:
      - 'packages/**'
      - '!packages/**.md'
  pull_request:
    paths:
      - 'packages/**'
      - '!packages/**.md'

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: install
        run: npm i && npm run setup:skip-build

      - name: lint
        run: npm run lint

  test-designer:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: install
        run: npm i && npm run setup:skip-build

      - name: test
        run: cd packages/designer && npm test