diff options
author | Bernat Gabor <jokerjokerer@gmail.com> | 2017-12-06 15:06:48 +0000 |
---|---|---|
committer | Bernat Gabor <jokerjokerer@gmail.com> | 2017-12-06 20:49:09 +0000 |
commit | 5199069386deb02da6e0e5217629925d27a46608 (patch) | |
tree | 59646a1f3a6fc7218ea10b86547b27700ac45904 /appveyor.yml | |
parent | 40581bbbced50fa3388d283721f3bfa847c1c202 (diff) | |
download | dateutil-5199069386deb02da6e0e5217629925d27a46608.tar.gz |
make the CI to use tox
- tox -e py27,py36,coverage allows you to merge and report coverage
files locally too
- tox without args will run all existing python tests and do coverage
report
- codecov is uploaded via a tox env (not ran by default)
Diffstat (limited to 'appveyor.yml')
-rw-r--r-- | appveyor.yml | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/appveyor.yml b/appveyor.yml index 034bcc9..8abb7b0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,48 +1,38 @@ build: false environment: matrix: - - PYTHON: "C:/Python27" - - PYTHON: "C:/Python27-x64" - - PYTHON: "C:/Python33" - - PYTHON: "C:/Python33-x64" - - PYTHON: "C:/Python34" - - PYTHON: "C:/Python34-x64" - - PYTHON: "C:/Python35" - - PYTHON: "C:/Python35-x64" - - PYTHON: "C:/Python36" - - PYTHON: "C:/Python36-x64" + - PYTHON_VERSION: 27 + - PYTHON_VERSION: 33 + - PYTHON_VERSION: 34 + - PYTHON_VERSION: 35 + - PYTHON_VERSION: 36 +platform: + - x86 + - x64 -install: - # Add PostgreSQL (zic), Python and scripts directory to current path - - set PATH=%PYTHON%;%PYTHON%/Scripts;c:\Program Files\PostgreSQL\9.3\bin\;%PATH% - - python --version +matrix: + fast_finish: true - # Not sure what the best way to get the Python minor version in a clear way - - set VERSION_CMD='python -c "import sys; print(\".\".join(map(str, sys.version_info[0:2])))"' - - for /f %%i in (%VERSION_CMD%) do set PYTHON_VERSION=%%i +install: + # set env variables + - set TOXENV=py%PYTHON_VERSION% + - if %PLATFORM% == "X64" (set PYTHON_PATH=C:\Python%PYTHON_VERSION%-x64) ELSE (set PYTHON_PATH=C:\Python%PYTHON_VERSION%) - # Download scripts and dependencies - - if %PYTHON_VERSION%==3.3 pip install "py<1.5.0" - - "pip install -r requirements-dev.txt" - - "pip install codecov" - - # If any of our dependencies installed python-dateutil, drop it - - pip uninstall -y python-dateutil && exit 0 - - pip install . + # Add PostgreSQL (zic), Python and scripts directory to current path + - set PATH=%PYTHON_PATH%;c:\Program Files\PostgreSQL\9.3\bin\;%PATH% + - set PYTHON=%PYTHON_PATH%/python.exe + - "%PYTHON% -c \"import sys; print(sys.executable, sys.version)\"" # This frequently fails with network errors, so we'll retry it up to 5 times # with a 1 minute rate limit. - - "ci_tools/retry.bat %PYTHON%/python.exe updatezinfo.py" + - "%PYTHON% -m pip install six" + - "ci_tools/retry.bat %PYTHON% updatezinfo.py" # This environment variable tells the test suite it's OK to mess with the time zone. - set DATEUTIL_MAY_CHANGE_TZ=1 -before_test: - - mkdir build_test - - mkdir build_test\\test - # All these options seem to be the equivalent of cp -pr - - xcopy dateutil\\test build_test\\test /E /H /K /O /X - - cd build_test + - C:\Python36\python -m pip install -U tox + test_script: - - "coverage run --source=dateutil -m pytest -v" + - C:\Python36\scripts\tox + after_test: - - "coverage report -m" - - "codecov" + - C:\Python36\scripts\tox -e coverage,codecov |