Skip to content

Commit fb77d7a

Browse files
committed
ci: Finalize Travis CI integration
1 parent b39be55 commit fb77d7a

File tree

5 files changed

+78
-8
lines changed

5 files changed

+78
-8
lines changed

.ci/download_webhost.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
5+
if [ -e "downloads/webhost/Microsoft.Azure.WebJobs.Script.WebHost.dll" ]; then
6+
exit 0
7+
fi
8+
9+
mkdir -p downloads/webhost
10+
cd downloads/webhost
11+
12+
wget http://ci.appveyor.com/api/buildjobs/y6wonxc4o3k529s8/artifacts/Functions.Binaries.2.0.11549-alpha.zip
13+
unzip Functions.Binaries.2.0.11549-alpha.zip || true
14+
15+
[ -e "Microsoft.Azure.WebJobs.Script.WebHost.dll" ]

.ci/travis_before_install.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
5+
git clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv
6+
PYENV_ROOT="$HOME/.pyenv"
7+
PATH="$PYENV_ROOT/bin:$PATH"
8+
eval "$(pyenv init -)"
9+
10+
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
11+
pyenv install ${PYTHON_VERSION}
12+
fi
13+
pyenv global ${PYTHON_VERSION}
14+
pyenv rehash

.ci/travis_install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
5+
dotnet --version
6+
7+
PYENV_ROOT="$HOME/.pyenv"
8+
PATH="$PYENV_ROOT/bin:$PATH"
9+
eval "$(pyenv init -)"
10+
pyenv global ${PYTHON_VERSION}
11+
12+
python --version
13+
14+
.ci/download_webhost.sh
15+
16+
pip install -r requirements-dev.txt
17+
pip install -e .
18+
19+
python setup.py gen_grpc

.ci/travis_tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
5+
PYENV_ROOT="$HOME/.pyenv"
6+
PATH="$PYENV_ROOT/bin:$PATH"
7+
eval "$(pyenv init -)"
8+
pyenv global ${PYTHON_VERSION}
9+
10+
dotnet --version
11+
python --version
12+
13+
python setup.py test

.travis.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
sudo: false
1+
dist: trusty
22

3-
language: python
3+
language: csharp
4+
mono: none
5+
dotnet: 2.1.2
46

5-
python:
6-
- 3.6
7+
env:
8+
global:
9+
- PYTHON_VERSION=3.6.3
10+
- PYAZURE_WEBHOST_DLL="$PWD/downloads/webhost/Microsoft.Azure.WebJobs.Script.WebHost.dll"
11+
12+
cache:
13+
directories:
14+
- "downloads"
15+
16+
before_install:
17+
- .ci/travis_before_install.sh
718

819
install:
9-
- pip install -r requirements-dev.txt
10-
- pip install -e .
11-
- python setup.py gen_grpc
20+
- .ci/travis_install.sh
1221

1322
script:
14-
- python setup.py test
23+
- .ci/travis_tests.sh

0 commit comments

Comments
 (0)