File tree Expand file tree Collapse file tree 2 files changed +45
-11
lines changed Expand file tree Collapse file tree 2 files changed +45
-11
lines changed Original file line number Diff line number Diff line change 1+ os : linux
12language : python
2-
33dist : xenial
4-
54cache : pip
65
76notifications :
87 email : true
98
10- matrix :
11- include :
12- - python : 3.5
13- - python : 3.6
14- - python : 3.7
15- - python : 3.8
9+ matrix :
10+ include :
11+ - python : 3.5
12+ - python : 3.6
13+ - python : 3.7
14+ - python : 3.8
1615
1716before_install :
1817- npm install npm@latest -g
@@ -23,9 +22,15 @@ before_install:
2322
2423install :
2524- pip install tox-travis
26-
27- script : tox
28-
25+ - pip install -r requirements.txt
26+ - pip install -r requirements-dev.txt
27+ - pip install .
28+ - python setup.py build
29+
30+ script :
31+ - tox
32+ - pytest test
33+ - ./test-integration.sh
2934
3035# To enable semantic-release, uncomment these sections.
3136# before_deploy:
Original file line number Diff line number Diff line change 1+ # Code Engine Python SDK Integration tests
2+ # Requires the following env. variables (provdied to TravisCI)
3+ # - CE_API_KEY: IBM Cloud API Key
4+ # - CE_PROJECT_ID: GUID of Code Engine project to target
5+ # - CE_PROJECT_REGION: region for API URL
6+
7+ echo " Running integration tests..."
8+
9+ # Install dependencies
10+ pip install kubernetes
11+
12+ # Run example, get exit code
13+ exampleoutput=$( python example/example.py)
14+ exampleexit=$?
15+ if [ $exampleexit -ne 0 ]; then
16+ echo " Integration tests failed with exit code $exampleexit "
17+ echo $exampleoutput
18+ exit $exampleexit
19+ fi
20+
21+ # Check if output is expected
22+ outputcheck=" 2 configmaps"
23+ if [[ $exampleoutput != * $outputcheck * ]]; then
24+ echo " Intergration test output is incorrect:"
25+ echo " Expected '$exampleoutput ' to contain '$outputcheck '"
26+ exit 1
27+ fi
28+
29+ echo " Success!"
You can’t perform that action at this time.
0 commit comments