Skip to content

Commit f60f58f

Browse files
committed
Travis-ci support.
1 parent 07e0e0c commit f60f58f

7 files changed

+29
-4
lines changed

.travis.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: python # this works for Linux but is an error on macOS or Windows
2+
matrix:
3+
include:
4+
- name: "Python 3.7.1 on Xenial Linux"
5+
python: 3.7 # this works for Linux but is ignored on macOS or Windows
6+
dist: xenial # required for Python >= 3.7
7+
script: bash run_tests.sh
8+
- name: "Python 3.7.3 on Windows "
9+
os: windows # Windows 10.0.17134 N/A Build 17134
10+
language: shell # 'language: python' is an error on Travis CI Windows
11+
before_install:
12+
- choco install python3
13+
- pip install virtualenv
14+
- virtualenv $HOME/venv
15+
- source $HOME/venv/Scripts/activate
16+
- pip install -r requirements.txt
17+
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
18+
script: nose2 tests --plugin nose2.plugins.junitxml --config myconfig.cfg

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ The MIT License (MIT)
1919

2020
**Package Download**
2121
https://pypi.python.org/pypi/object-mapper
22+
23+
**Build Status**
24+
[![Build Status](https://travis-ci.com/marazt/object-mapper.svg?branch=master)](https://travis-ci.com/marazt/object-mapper)
25+
2226
---
2327

2428
## Versions

myconfig.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[junit-xml]
2+
always-on = True
3+
path = TEST-results.xml

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
datetime
2-
nose
1+
nose2==0.9.1

run_tests.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
REM prerequisites: pip, virtualenv in path
22
virtualenv venv
33
cd venv/Scripts/
4-
activate.bat & cd ../.. & pip install -r requirements.txt & nosetests tests --with-xunit --xunit-file=TEST-results.xml
4+
activate.bat & cd ../.. & pip install -r requirements.txt & nose2 tests --plugin nose2.plugins.junitxml --config myconfig.cfg

run_tests.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!bin/bash
22
# prerequisites: pip, virtualenv in path
3+
pip install virtualenv
34
virtualenv venv
45
source venv/bin/activate
56
pip install -r requirements.txt
6-
nosetests tests --with-xunit --xunit-file=TEST-results.xml
7+
nose2 tests --plugin nose2.plugins.junitxml --config myconfig.cfg
File renamed without changes.

0 commit comments

Comments
 (0)