name: main

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  macOS:
    runs-on: macOS-latest
    env:
      CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
      SUBLIME_TEXT_VERSION: "3"
      SUBLIME_TEXT_ARCH: x64
      PACKAGE: LSP
    steps:
    - run: echo ::add-path::$HOME/.local/bin
    - run: echo ::add-path::$HOME/Library/Python/3.7/bin
    - uses: actions/checkout@v1
    - run: python3 tests/server.py --version
    - run: python3 tests/adjust_unittesting_config_for_ci.py && cat unittesting.json
    - run: curl --silent https://raw.githubusercontent.com/SublimeText/UnitTesting/master/sbin/ci.sh --output ci.sh
    - run: |
        sh ci.sh bootstrap
        sh ci.sh install_package_control
        subl &
        sleep 8
        sh ci.sh run_tests --coverage
      name: Run UnitTesting tests
    - run: pip3 install mypy==0.750 flake8==3.7.9 yapf==0.29.0 --user
    - run: mypy -p plugin
    - run: flake8 plugin tests
    - run: yapf --diff plugin/core/main.py
    - run: |
        pip3 install coverage==4.5.4 codecov==2.0.15
        codecov

name: main

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  macOS:
    runs-on: macOS-latest
    env:
      CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
      SUBLIME_TEXT_VERSION: "3"
      SUBLIME_TEXT_ARCH: x64
      PACKAGE: LSP
    steps:
    - run: echo ::add-path::$HOME/.local/bin
    - run: echo ::add-path::$HOME/Library/Python/3.7/bin
    - uses: actions/checkout@v1
    - run: python3 tests/server.py --version
    - run: python3 tests/adjust_unittesting_config_for_ci.py && cat unittesting.json
    - run: curl --silent https://raw.githubusercontent.com/SublimeText/UnitTesting/master/sbin/ci.sh --output ci.sh
    - run: |
        sh ci.sh bootstrap
        sh ci.sh install_package_control
        subl --stay &
        sleep 8
        sh ci.sh run_tests --coverage
      name: Run UnitTesting tests
    - run: pip3 install mypy==0.750 flake8==3.7.9 yapf==0.29.0 --user
    - run: mypy -p plugin
    - run: flake8 plugin tests
    - run: yapf --diff plugin/core/main.py
    - run: |
        pip3 install coverage==4.5.4 codecov==2.0.15
        codecov

Use --stay argument so that focus is not taken away from ST when file closes
Use --stay argument so that focus is not taken away from ST when file closes

ST3 opens a "random" file (on mac it's in `/tmp/subl stdin XXXX`). When
the deferred tests start, that file is closed and then focus is switched
to terminal. That can affect testing as activated/deactived view events
are no longer dispatched then.
