summaryrefslogtreecommitdiff
path: root/azure-pipelines.yml
blob: f972f85c6a22331494ac984b959553fd6ba78ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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
    Windows36:
      python.version: '3.6'
      POOL_IMAGE: vs2017-win2016
      installzic: 'windows'
    PyPy:
      python.version: 'pypy2'
    PyPy3:
      python.version: 'pypy3'
    WindowsPyPy2:
      python.version: 'pypy2'
      POOL_IMAGE: vs2017-win2016
      installzic: 'windows'
    WindowsPyPy3:
      python.version: 'pypy3'
      POOL_IMAGE: vs2017-win2016
      installzic: 'windows'

variables:
  TOXENV: py
  POOL_IMAGE: ubuntu-16.04

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: $(python.version)

- bash: |
    python -m pip install -U six && python -m pip install -U 'tox < 3.8.0'
    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 || true
    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')))