name: TypeScript type check

on:
  push:
    branches:
      - main
  pull_request: {}

jobs:
  tsc:
    name: tsc
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Get yarn cache directory path
      id: yarn-cache-dir-path
      run: echo "::set-output name=dir::$(yarn cache dir)"
    - name: Set up yarn cache
      uses: actions/cache@v1
      id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
      with:
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
        key: ${{ runner.os }}-tsc-yarn-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-tsc-yarn-${{ github.ref }}-
          ${{ runner.os }}-tsc-yarn-
    - name: install node v12
      uses: actions/setup-node@v1
      with:
        node-version: 12
    - name: yarn install
      run: yarn install
    - name: tsc
      uses: icrawl/action-tsc@v1

name: TypeScript type check

on:
  push:
    branches:
      - main
  pull_request: {}

jobs:
  tsc:
    name: tsc
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Get yarn cache directory path
      id: yarn-cache-dir-path
      run: echo "::set-output name=dir::$(yarn cache dir)"
    - name: Set up yarn cache
      uses: actions/cache@v1
      id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
      with:
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
        key: ${{ runner.os }}-tsc-yarn-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-tsc-yarn-${{ github.ref }}-
          ${{ runner.os }}-tsc-yarn-
    - name: install node v14
      uses: actions/setup-node@v1
      with:
        node-version: 14
    - name: yarn install
      run: yarn install
    - name: tsc
      uses: icrawl/action-tsc@v1

Upgrade version of Node used for TypeScript checks
Upgrade version of Node used for TypeScript checks
