name: CI

on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os:
          - ubuntu-latest
          - macOS-latest
        node_version:
          - 14
          - 16

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node_version }}
          cache: 'yarn'

      - run: yarn
      - run: yarn bootstrap
      - run: yarn build
      - run: yarn test
      - run: yarn lint
