forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
107 lines (79 loc) · 3.17 KB
/
.appveyor.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
environment:
global:
APPVEYOR_PYTHON_URL: "https://raw.githubusercontent.com/ogrisel/python-appveyor-demo/master/appveyor/"
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
PYWIKIBOT2_DIR: "%appdata%\\Pywikibot"
PYWIKIBOT2_USER_CONFIG: "%appdata%\\Pywikibot\\user-config.py"
PYSETUP_TEST_EXTRAS: "1"
matrix:
# Test the lowest supported release of each major Python version.
# Pywikibot support matrix suggests 'should run' on Python 2.6.5+
# Only Python 2.6.6 is able to be set up on Appveyor.
# https://github.com/ogrisel/python-appveyor-demo/issues/10
# fwiw, Redhat Enterprise Linux ships with 2.6.6.
- PYTHON: "C:\\Python266-x64"
PYTHON_VERSION: "2.6.6"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python272-x64"
PYTHON_VERSION: "2.7.2"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python330-x64"
PYTHON_VERSION: "3.3.0"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python340-x64"
PYTHON_VERSION: "3.4.0"
PYTHON_ARCH: "64"
# Appveyor pre-installs these versions onto build machines
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python33"
PYTHON_VERSION: "3.3.x" # currently 3.3.5
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.x" # currently 3.4.3
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python33-x64"
PYTHON_VERSION: "3.3.x" # currently 3.3.5
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.x" # currently 3.4.3
PYTHON_ARCH: "64"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
install:
- git submodule update --init
# Download the Appveyor Python build accessories into subdirectory .\appveyor
- mkdir appveyor
- ps: $wc = new-object net.webclient
- ps: $run = $wc.DownloadString($env:APPVEYOR_PYTHON_URL + 'run_with_env.cmd')
- ps: $run | Out-File -Encoding ascii -FilePath appveyor\run_with_env.cmd
# This is needed for Python versions not installed on Appveyor build machines
- ps: if (-not(Test-Path($env:PYTHON))) { iex $wc.DownloadString($env:APPVEYOR_PYTHON_URL + 'install.ps1') }
- pip install virtualenv
- virtualenv env
- env\Scripts\activate.bat
- pip install -r dev-requirements.txt
- pip install -r requests-requirements.txt
build: off
test_script:
- chcp 65001
- set PYTHONIOENCODING=utf8
- "mkdir %PYWIKIBOT2_DIR%"
- "python -Werror::UserWarning -m generate_user_files -dir:%PYWIKIBOT2_DIR% -family:wikipedia -lang:en -v -debug"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT2_USER_CONFIG, 'max_retries = 2; maximum_GET_length = 5000; transliteration_target = None;')"
- set PYSETUP_TEST_NO_UI=1
- "%CMD_IN_ENV% coverage run setup.py test"
on_failure:
- codecov
on_success:
- codecov
artifacts:
- path: dist\* .coverage coverage.xml