Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Azure Pipelines #868

Merged
merged 2 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
80 changes: 80 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
pool:
vmImage: $[ variables.POOL_IMAGE ]

strategy:
matrix:
Python27:
python.version: '2.7'
Python34:
python.version: '3.4'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Docs:
python.version: '3.6'
TOXENV: docs
TZ:
python.version: '3.6'
TOXENV: tz
macOS:
python.version: '3.6'
POOL_IMAGE: macos-10.13
Windows:
python.version: '3.6'
POOL_IMAGE: vs2017-win2016
installzic: 'windows'
PyPy:
PYTHON: 'pypy'
PyPy3:
PYTHON: 'pypy3'

variables:
TOXENV: py
POOL_IMAGE: ubuntu-16.04
PYTHON: 'python'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
condition: notIn(variables.PYTHON, 'pypy', 'pypy3')

- bash: |
PYPYDIR=$(dirname $(dirname $(readlink -f $(which $PYTHON))))
sudo chmod a+rwX -R $PYPYDIR
$PYTHON -m ensurepip
displayName: Ensure pip
condition: in(variables.PYTHON, 'pypy', 'pypy3')

- bash: |
$PYTHON -m pip install -U six && $PYTHON -m pip install -U tox
if [[ $PYTHON_VERSION == "3.3" ]]; then pip install 'virtualenv<16.0'; fi
if [[ $PYTHON_VERSION == "3.3" ]]; then pip install 'setuptools<40.0'; fi
displayName: Ensure prereqs

- bash: |
curl https://get.enterprisedb.com/postgresql/postgresql-9.4.20-1-windows-x64-binaries.zip --output postgresql.zip
unzip -oq postgresql.zip -d postgresql
echo $PATH
echo "##vso[task.prependpath]$(System.DefaultWorkingDirectory)\postgresql\pgsql\bin"
displayName: Install zic on Windows
condition: eq(variables.installzic, 'windows')

- bash: |
if [[ $TOXENV == "py" ]]; then
./ci_tools/retry.sh $PYTHON updatezinfo.py
$PYTHON -m tox -- dateutil/test --cov-config=tox.ini --cov=dateutil --junitxml=unittests/TEST-$(Agent.JobName).xml
$PYTHON -m tox -e coverage,codecov
else
$PYTHON -m tox
fi
displayName: Run tox

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/TEST-*.xml'
testRunTitle: '$(Agent.JobName)'
condition: and(succeededOrFailed(), not(eq(variables['Agent.JobName'], 'Docs')))
6 changes: 5 additions & 1 deletion ci_tools/run_tz_master_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ TMP_TARBALL=${TMP_DIR}/dateutil-zoneinfo.tar.gz

UPSTREAM_URL="https://github.com/eggert/tz.git"

if [ -n "$TF_BUILD" ]; then
EXTRA_TEST_ARGS=--junitxml=../unittests/TEST-tz.xml
fi

function cleanup {
# Since this script modifies the original repo, whether or not
# it fails we need to restore the original file so as to not
Expand Down Expand Up @@ -89,5 +93,5 @@ ${CITOOLS_DIR}/make_zonefile_metadata.py \
python ${REPO_DIR}/updatezinfo.py $ZONEFILE_METADATA_NAME

# Run the tests
python -m pytest ${REPO_DIR}/dateutil/test
python -m pytest ${REPO_DIR}/dateutil/test $EXTRA_TEST_ARGS

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ skip_missing_interpreters = true
[testenv]
description = run the unit tests with pytest under {basepython}
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
commands = python -m pytest {posargs: "{toxinidir}/dateutil/test" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
deps = -rrequirements-dev.txt

Expand Down