CI fixes
This enables Linux testing on Appveyor, fixes .NET installation on Travis and adds the ability to test on multiple Python versions (although 3.7 testing is not enabled yet). Fixes: #169 Issue: #166
This commit is contained in:
Родитель
786d79d469
Коммит
6fe5325fb3
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
for d in $(ls -d /home/appveyor/venv${PYTHON_VERSION}*/bin/ | sort -nr); do
|
||||
echo "${d}"
|
||||
exit 0
|
||||
done
|
||||
|
||||
echo "Could not find Python version ${PYTHON_VERSION}" >&2
|
||||
exit 1
|
|
@ -1,2 +0,0 @@
|
|||
$env:PYAZURE_WEBHOST_DLL = "$(Get-Location)\$($env:PYAZURE_WEBHOST_PATH)\$($env:PYAZURE_WEBHOST_EXECUTABLE)"
|
||||
& $env:PYTHON setup.py test
|
|
@ -1,3 +0,0 @@
|
|||
%PYTHON% .ci\appveyor_setup_worker.py > worker_path
|
||||
set /p PYAZURE_WORKER_DIR=<worker_path
|
||||
%PYTHON% setup.py test
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
export PATH="$(pwd)/.dotnet:${PATH}"
|
||||
|
||||
python -m pip install -U -e .[dev]
|
||||
python setup.py webhost
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
mkdir .dotnet
|
||||
wget https://raw.githubusercontent.com/dotnet/cli/80d542b8f4eff847a0f72dc8f2c2a29851272778/scripts/obtain/dotnet-install.sh
|
||||
chmod +x dotnet-install.sh
|
||||
./dotnet-install.sh --version ${DOTNET_VERSION} --install-dir .dotnet
|
||||
|
||||
.dotnet/dotnet --info
|
||||
python --version
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
set -e -x
|
||||
|
||||
dotnet --version
|
||||
python --version
|
||||
export PATH="$(pwd)/.dotnet:${PATH}"
|
||||
|
||||
python setup.py test
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
python --version
|
||||
|
||||
pip install -U -e .[dev]
|
||||
python setup.py webhost
|
|
@ -0,0 +1,2 @@
|
|||
python -m pip install -U -e .[dev]
|
||||
python setup.py webhost
|
|
@ -0,0 +1,3 @@
|
|||
python .ci\appveyor_setup_worker.py > worker_path
|
||||
set /p PYAZURE_WORKER_DIR=<worker_path
|
||||
python setup.py test
|
12
.travis.yml
12
.travis.yml
|
@ -1,9 +1,13 @@
|
|||
dist: trusty
|
||||
|
||||
env:
|
||||
- DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_VERSION=2.1.300
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
- ci
|
||||
|
||||
language: python
|
||||
python:
|
||||
|
@ -17,14 +21,16 @@ addons:
|
|||
|
||||
packages:
|
||||
- libunwind8
|
||||
- dotnet-sdk-2.1.300
|
||||
- azure-functions-core-tools
|
||||
|
||||
cache:
|
||||
pip: true
|
||||
|
||||
before_install:
|
||||
- .ci/linux_install.sh
|
||||
|
||||
install:
|
||||
- .ci/travis_install.sh
|
||||
- .ci/linux_build.sh
|
||||
|
||||
script:
|
||||
- .ci/travis_tests.sh
|
||||
- .ci/linux_tests.sh
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
recursive-include azure *.py *.pyi *.json
|
||||
recursive-include azure *.py *.pyi
|
||||
recursive-include tests *.py *.json
|
||||
include LICENSE README.md
|
||||
|
|
56
appveyor.yml
56
appveyor.yml
|
@ -1,18 +1,58 @@
|
|||
image:
|
||||
- Visual Studio 2017
|
||||
- Ubuntu
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
- ci
|
||||
|
||||
environment:
|
||||
PIP_NO_WARN_SCRIPT_LOCATION: 0
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
DOTNET_VERSION: 2.1.300
|
||||
|
||||
matrix:
|
||||
- PYTHON: "C:\\Python36-x64\\python.exe"
|
||||
- PYTHON_VERSION: 3.6
|
||||
# - PYTHON_VERSION: 3.7
|
||||
|
||||
install:
|
||||
- choco install azure-functions-core-tools --pre
|
||||
for:
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- image: Visual Studio 2017
|
||||
|
||||
build_script:
|
||||
- "%PYTHON% -m pip install -U -e .[dev]"
|
||||
- "%PYTHON% setup.py webhost"
|
||||
install:
|
||||
- ps: $Env:PATH = "C:\\Python" + $Env:PYTHON_VERSION.replace(".", "") + "-x64\\;" + $env:PATH
|
||||
- cmd: choco install azure-functions-core-tools --pre
|
||||
- cmd: dotnet --info
|
||||
- cmd: python --version
|
||||
|
||||
test_script:
|
||||
- .ci\appveyor_tests.bat
|
||||
build_script:
|
||||
- cmd: .ci\win_build.bat
|
||||
|
||||
test_script:
|
||||
- cmd: .ci\win_tests.bat
|
||||
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- image: Ubuntu
|
||||
|
||||
install:
|
||||
- sh: PATH="$(.ci/appveyor_find_python.sh):${PATH}"
|
||||
- sh: |
|
||||
sudo add-apt-repository -y \
|
||||
'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main' \
|
||||
&& sudo apt-get update \
|
||||
&& sudo apt-get install -y \
|
||||
azure-functions-core-tools
|
||||
- sh: .ci/linux_install.sh
|
||||
|
||||
build_script:
|
||||
- sh: .ci/linux_build.sh
|
||||
|
||||
test_script:
|
||||
- sh: .ci/linux_tests.sh
|
||||
|
|
8
setup.py
8
setup.py
|
@ -186,12 +186,12 @@ setup(
|
|||
'azure.functions_worker.protos',
|
||||
'azure.functions_worker.bindings'],
|
||||
setup_requires=[
|
||||
'grpcio~=1.12.1',
|
||||
'grpcio-tools~=1.12.1',
|
||||
'grpcio~=1.14.0',
|
||||
'grpcio-tools~=1.14.0',
|
||||
],
|
||||
install_requires=[
|
||||
'grpcio~=1.12.1',
|
||||
'grpcio-tools~=1.12.1',
|
||||
'grpcio~=1.14.0',
|
||||
'grpcio-tools~=1.14.0',
|
||||
'azure-functions==1.0.0a1',
|
||||
],
|
||||
extras_require={
|
||||
|
|
Загрузка…
Ссылка в новой задаче