|
1 | 1 | version: '{branch}.{build}'
|
2 | 2 | clone_depth: 3
|
3 |
| -environment: |
4 |
| - TRAVIS_BUILD_DIR: c:\projects\integrations-core |
5 |
| - INTEGRATIONS_DIR: c:\projects\integrations-core\embedded |
6 |
| - PIP_CACHE: c:\projects\integrations-core\.cache\pip |
7 |
| - VOLATILE_DIR: c:\projects |
8 |
| - NOSE_FILTER: not unix and not fixme and not winfixme |
9 |
| - PYWIN_PATH: C:\projects\integrations-core\.cache\pywin32-py2.7.exe |
10 |
| - SKIP_LINT: true |
11 |
| - DD_AGENT_BRANCH: master |
12 |
| - SDK_TESTING: true |
13 |
| - PYTHON: C:\Python27-x64 |
14 |
| - PYTHON_VERSION: 2.7.13 |
15 |
| - PYTHON_ARCH: 64 |
16 |
| - PYWIN32_URL: https://downloads.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe |
17 |
| - PYWIN32_INSTALL_DIR: pywin32-219-py2.7-win-amd64.egg |
18 |
| -init: |
19 |
| - - set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% |
| 3 | +build: off |
| 4 | +test: off |
| 5 | +skip_branch_with_pr: true |
20 | 6 | cache:
|
21 |
| - - C:\projects\integrations-core\.cache |
22 |
| - - C:\projects\integrations-core\vendor\cache |
23 |
| - - C:\projects\integrations-core\embedded |
| 7 | + - '%LOCALAPPDATA%\pip\Cache' |
24 | 8 | services:
|
25 | 9 | - iis
|
26 | 10 | # We can't start more than one MSSQL instance to avoid conflicts on TCP port 1433. The only workaround to test a check
|
27 | 11 | # against multiple versions is letting the test code to start/stop the corresponding services so that they run one at
|
28 | 12 | # a time. See https://www.appveyor.com/docs/services-databases/ for details.
|
29 | 13 | - mssql2008r2sp2
|
| 14 | + |
| 15 | +branches: |
| 16 | + only: |
| 17 | + - master |
| 18 | + |
| 19 | +environment: |
| 20 | + PYTHON2: C:\Python27-x64 |
| 21 | + PYTHON3: C:\Python36-x64 |
| 22 | + |
| 23 | +init: |
| 24 | + # Add Python 3 to PATH |
| 25 | + - set PATH=%PYTHON3%;%PYTHON3%\Scripts;%PATH% |
| 26 | + - python -c "import sys; print(sys.version)" |
| 27 | + |
| 28 | + # Add Python 2 to PATH before Python 3 |
| 29 | + - set PATH=%PYTHON2%;%PYTHON2%\Scripts;%PATH% |
| 30 | + - python -c "import sys; print(sys.version)" |
| 31 | + |
| 32 | + - if defined APPVEYOR_PULL_REQUEST_NUMBER ( set "CHANGED_ONLY_FLAG= --changed" ) else ( set "CHANGED_ONLY_FLAG= " ) |
| 33 | + |
30 | 34 | install:
|
31 |
| - # Use the 64-bit ruby so that all the Powershell classes are accessible when running shell commands from ruby |
32 |
| - - set PATH=C:\Ruby22-x64\bin;%PATH% |
33 |
| - - bundle install |
34 |
| - - bundle package |
35 |
| - - git clone -b %DD_AGENT_BRANCH% https://github.com/DataDog/dd-agent.git c:\projects\dd-agent |
36 |
| - - if not exist %PIP_CACHE% mkdir %PIP_CACHE% |
37 |
| - - cmd: appveyor-retry powershell If (-Not (Test-Path $env:PYWIN_PATH)) {(new-object net.webclient).DownloadFile("$env:PYWIN32_URL", "$env:PYWIN_PATH")} |
38 |
| - - "%PYTHON%/Scripts/easy_install.exe %PYWIN_PATH%" |
39 |
| - - ps: mkdir -p $(python -m site --user-site) |
40 |
| - - ps: echo "C:\projects\dd-agent" | out-file "$(python -m site --user-site)/datadog-agent.pth" -encoding ASCII |
41 |
| - - ps: (& "$env:PYTHON/python.exe" -m pip install --upgrade pip codecov) |
42 |
| - - ps: '& "$env:PYTHON/Scripts/pip.exe" install -r c:\projects\dd-agent\requirements.txt' |
43 |
| - # Remove the adodbapi module shipped with pywin32: it conflicts with the pip-installed adodbapi |
44 |
| - - ps: rm $env:PYTHON/lib/site-packages/$env:PYWIN32_INSTALL_DIR/adodbapi/__init__.py |
45 |
| - - ps: rm $env:PYTHON/lib/site-packages/$env:PYWIN32_INSTALL_DIR/adodbapi/__init__.pyc |
46 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install -U virtualenv) |
47 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" uninstall -y docker-py) |
48 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install .\datadog_checks_dev[cli]) |
| 35 | + - python -m pip install --upgrade --disable-pip-version-check pip virtualenv codecov |
| 36 | + - pip uninstall -y docker-py |
| 37 | + - pip install .\datadog_checks_dev[cli] |
49 | 38 | - ddev config set core .
|
50 |
| - - cd datadog_checks_base |
51 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install .) |
52 |
| - - cd .. |
53 |
| - - cd sqlserver |
54 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install .) |
55 |
| - - cd .. |
56 |
| - - cd windows_service |
57 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install .) |
58 |
| - - cd .. |
59 |
| - - cd wmi_check |
60 |
| - - ps: (& "$env:PYTHON/Scripts/pip.exe" install .) |
61 |
| - - cd .. |
62 |
| -build: off |
| 39 | + |
63 | 40 | test_script:
|
64 |
| - - ddev test datadog_checks_base active_directory aspdotnet dotnetclr exchange_server iis pdh_check sqlserver win32_event_log windows_service wmi_check |
| 41 | + # Only test any of these that have changed for pull requests |
| 42 | + - ddev test%CHANGED_ONLY_FLAG% datadog_checks_base active_directory aspdotnet dotnetclr exchange_server iis pdh_check sqlserver win32_event_log windows_service wmi_check |
65 | 43 |
|
66 | 44 | # Uncomment the following to enable RDP connection into the builder and debug a build
|
67 | 45 | # on_finish:
|
|
0 commit comments