name: CI

on: pull_request

jobs:
  build:
    runs-on: ubuntu-latest

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

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2

      - name: yarn install
        run: yarn install --frozen-lockfile

      - name: yarn lint
        run: yarn lint

      - name: yarn tsc
        run: yarn tsc

      - name: yarn build
        run: yarn build

      - name: Install mkdocs
        run: python -m pip install mkdocs

      - name: Install mkdocs-techdocs-core
        run: python -m pip install mkdocs-techdocs-core

      - name: yarn test
        run: yarn test
