name: CLI tests

on:
  push
  # push:
# disabled for now:
# https://github.community/t5/GitHub-Actions/Preserve-status-from-previous-action-run/m-p/33821#M1661
#     paths:
#     - 'lib/**'
#     - 'app/**'

jobs:
  cli:
    name: CLI Fixtures
    runs-on: ubuntu-latest
    steps:
    - uses: actions/setup-node@v1
      with:
        node-version: '10.x'
    - name: increase filewatcher limit
      run: |
        echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    - uses: actions/checkout@v2
    - name: Cache node modules
      uses: actions/cache@v1
      with:
        path: node_modules
        key: build-v2-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          build-v2-${{ env.cache-name }}-
          build-v2-
    - name: install, bootstrap
      run: |
        yarn bootstrap --core
    - name: cli
      run: |
        yarn test --cli
