-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
appveyor: run test on multiple pythons versions and also on linux
Some checks of the example extensions only run on windows, because it was not adapted.
- Loading branch information
1 parent
29f4fbb
commit e232b06
Showing
4 changed files
with
59 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,18 +32,63 @@ on_failure: | |
if ($fileobj) { cat $fileobj; }; | ||
} | ||
image: | ||
- Visual Studio 2017 | ||
stack: python %PYTHON% | ||
|
||
environment: | ||
APPVEYOR_YML_DISABLE_PS_LINUX: true | ||
PYTHONEXE: python | ||
matrix: | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
TOXENV: py35 | ||
PYTHON: "3.5" | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
TOXENV: py36 | ||
PYTHON: "3.6" | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
TOXENV: py37 | ||
PYTHON: "3.7" | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
TOXENV: py38 | ||
PYTHON: "3.8" | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
TOXENV: py35 | ||
PYTHON: "3.5" | ||
PYTHONDIR: C:\Python35-x64 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
TOXENV: py36 | ||
PYTHON: "3.6" | ||
PYTHONDIR: C:\Python36-x64 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
TOXENV: py37 | ||
PYTHON: "3.7" | ||
PYTHONDIR: C:\Python37-x64 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
TOXENV: py38 | ||
PYTHON: "3.8" | ||
PYTHONDIR: C:\Python38-x64 | ||
|
||
# Configure the GitHub username and email for accessing the `pygls` release | ||
init: | ||
- git config --global user.name %OLL_GIT_USER_NAME% | ||
- git config --global user.email %OLL_GIT_EMAIL% | ||
|
||
# Install scripts. (runs after repo cloning) | ||
install: | ||
- C:\Python35-x64\python.exe -m pip install --upgrade pip # upgrade pip | ||
- python -m pip install tox | ||
|
||
# point to the same version as in `examples/json-extension/package.json` | ||
- npm install -g [email protected] | ||
- tsc --version | ||
|
||
# install vsce module (for packaging our extension into a .vsix file) | ||
- npm install -g [email protected] | ||
|
||
# Output useful info for debugging. | ||
- node --version | ||
- npm --version | ||
|
||
# Create a Visual Studio Code Extension | ||
build_script: | ||
# Create a Visual Studio Code Extension (only on windows for now) | ||
- ps: >- | ||
$json_extension_client_json = (Get-Content -Raw -Path examples\json-extension\package.json | ConvertFrom-Json); | ||
$prefixed_version = "v" + $json_extension_client_json.version; | ||
|
@@ -86,39 +131,18 @@ install: | |
} | ||
echo "APPVEYOR_BUILD_VERSION - $env:APPVEYOR_BUILD_VERSION"; | ||
# install pygls and dev dependencies | ||
- C:\Python35-x64\Scripts\pip.exe install .[dev] | ||
- C:\Python35-x64\Scripts\pip.exe install .[test] | ||
- C:\Python35-x64\Scripts\pip.exe install -e . | ||
|
||
# point to the same version as in `examples/json-extension/package.json` | ||
- npm install -g [email protected] | ||
- tsc --version | ||
|
||
# install vsce module (for packaging our extension into a .vsix file) | ||
- npm install -g [email protected] | ||
|
||
# Output useful info for debugging. | ||
- node --version | ||
- npm --version | ||
|
||
# Create a Visual Studio Code Extension | ||
build_script: | ||
- cd examples\json-extension | ||
- cd examples/json-extension | ||
# install extension-wide js dependencies | ||
- npm install --save-dev | ||
# run tslint | ||
- .\node_modules\.bin\tslint client\src\*.ts | ||
- ./node_modules/.bin/tslint client/src/*.ts | ||
# install our dependencies | ||
- npm install # TODO: replace with `yarn install` | ||
- npm install # TODO: replace with `yarn install` | ||
- tsc -p . | ||
|
||
- cd ..\..\ | ||
- cd ../../ | ||
|
||
test_script: | ||
- C:\Python35-x64\Scripts\flake8.exe | ||
- C:\Python35-x64\Scripts\bandit.exe -r ./pygls | ||
- C:\Python35-x64\Scripts\pytest.exe | ||
- python -m tox | ||
|
||
after_test: | ||
# check function | ||
|
@@ -132,9 +156,9 @@ after_test: | |
} | ||
# package up the json-extension client example VS Code extension | ||
- ps: cd examples/json-extension/ | ||
- cd examples/json-extension/ | ||
# check to see if key files will be in the `.vsix` package to be built | ||
- vsce ls > packages.txt rem list files to be packaged | ||
- vsce ls > packages.txt | ||
# files/folders to be checked | ||
- ps: CheckInVsixPackage "package.json" | ||
- ps: CheckInVsixPackage "out/extension.js" | ||
|
@@ -143,11 +167,10 @@ after_test: | |
- ps: CheckInVsixPackage "server/server.py" | ||
# clean-up after ourselves (so these files don't end up in our `.vsix` package) | ||
- rm packages.txt | ||
- rm results.txt | ||
- ps: rm results.txt | ||
# passed the basic checks, should be good-to-go | ||
- vsce package rem "normal" command line is on purpose | ||
|
||
- ps: cd ../ | ||
- vsce package | ||
- cd .. | ||
|
||
# Create extensions artifacts | ||
artifacts: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
[flake8] | ||
max-line-length = 99 | ||
|
||
[mypy] | ||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters