name: Validate

on: [push, pull_request]

jobs:
  test:
    name: Lint & Test
    runs-on: ubuntu-latest
    env:
      CI: true
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master

      - name: Setup Node.js 12.x
        uses: actions/setup-node@master
        with:
          node-version: 12.x

      - name: Install Dependencies
        run: yarn --frozen-lockfile

      - name: Lint
        run: yarn lint

      - name: Test
        run: yarn test

      - name: Cypress
        run: yarn cypress
