Skip to content

Commit 53f048b

Browse files
author
Krum Motsov
committed
Added travis and shippable conf files.
Added a testspace schema. Added a testspace install script
1 parent 5d2b3f7 commit 53f048b

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

.testspace.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<schema version="1.0" manual="0">
3+
<root>
4+
<suite name="Install.prerequisites" state="1" id=".sh" description="**Install** system prerequisites ">
5+
<attributes>
6+
<![CDATA[sudo pip install -r requirements.txt]]>
7+
</attributes>
8+
</suite>
9+
<suite name="Tests" state="1" id=".sh" description="run **all** of the unit tests">
10+
<attributes>
11+
<![CDATA[nose2 -X -C --coverage-report xml
12+
echo "$PWD/nose2.xml{test}" > ${self.result}]]>
13+
</attributes>
14+
</suite>
15+
<suite name="Coverage" state="1" id=".sh" description="Code coverage based on latest run. Review the ==Reports== tab for historical tracking">
16+
<attributes>
17+
<![CDATA[echo "$PWD/coverage.xml" > ${self.result}]]>
18+
</attributes>
19+
</suite>
20+
</root>
21+
</schema>

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: python
2+
python:
3+
- "2.7.6"
4+
before_script:
5+
# Install Testspace Runner
6+
- ./testspace_install.sh
7+
- sudo pip install -r requirements.txt
8+
script:
9+
- nose2 -X -C --coverage-report xml
10+
11+
# Publish Test Results along with Coverage
12+
- export PATH="${HOME}/testspace:${PATH}"
13+
# Testspace credentials: "[email protected]/myproject/myspace"
14+
- testspace config url ${TESTSPACE_USER_TOKEN}:@${TESTSPACE_URL}
15+
- testspace publish [Tests]nose2.xml coverage.xml

shippable.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: python
2+
3+
python:
4+
- "2.7.6"
5+
6+
env:
7+
global:
8+
- secure: KfVSPZZZ1/i/DDf6g4OOfcB1SvxHIP/cy/SGhLWxf7L/sH5EBy4sAkdZnxjH3Ku37p46jbLfqPZoL4fCyVrGYoPBDCCE8qrJo6ftFAxQdAMYFFV/fLaClH+euYCt2aOhR0c5v83M4r5GuUD338dRsGcowHmmRVRrckchIC3w7k1ih9OtLD6YLuQ+P8SvYUy1TWobvWzWT+3whB2uvU3o+2QLJrI+chpwbH+nf1RkvtYhNwVf8TwH8g+vDLVtsBjokUwDkc1zPo8GPylL2XQlQZ2t5Zbs8wJz0JQJvQGkbDBkS0QjRTTu2AL5vu6UwdRWNnB8jt8i7AChBc4ZPh8BZg==
9+
10+
before_script:
11+
- ./testspace_install.sh
12+
- export PATH="${HOME}/testspace:${PATH}"
13+
- mkdir -p shippable/codecoverage
14+
- mkdir -p shippable/testresults
15+
script:
16+
- testspace config url $TESTSPACE_TOKEN
17+
- testspace import .testspace.xml
18+
- testspace run
19+
20+
after_script:
21+
- cp nose2.xml shippable/testresults
22+
- cp coverage.xml shippable/codecoverage

testspace_install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Install the Testspace runner
4+
mkdir ${HOME}/testspace
5+
wget -N -P . https://testspace-runner.s3.amazonaws.com/testspace-linux-latest.tgz
6+
tar -zxvf testspace-linux-latest.tgz -C ${HOME}/testspace
7+
rm testspace-linux-latest.tgz
8+
# export PATH=${HOME}/testspace:${PATH}

0 commit comments

Comments
 (0)