forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
102 lines (81 loc) · 3.63 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
image: Visual Studio 2022
clone_depth: 50
skip_tags: true
version: 9.1.{build}
environment:
PYWIKIBOT_DIR: "%appdata%\\Pywikibot"
PYWIKIBOT_USER_CONFIG: "%appdata%\\Pywikibot\\user-config.py"
PYWIKIBOT_PASSWD_FILE: "%appdata%\\Pywikibot\\passwordfile"
PYSETUP_TEST_EXTRAS: "1"
PYWIKIBOT_TEST_GUI: "1"
PYWIKIBOT_TEST_RUNNING: "1"
matrix:
# Test the lowest supported release
# Python 3.7.0 is provided by VS 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.0"
PYTHON_ARCH: "32"
# AppVeyor pre-installs these versions onto build machines
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python310"
PYTHON_VERSION: "3.10.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python312"
PYTHON_VERSION: "3.12.x"
PYTHON_ARCH: "32"
matrix:
fast_finish: false
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
install:
# ignore SSL error for old image
- if [%PYTHON_VERSION%]==[3.7.0] set GIT_SSL_NO_VERIFY=true
- git submodule update --init
# Download the AppVeyor Python build accessories into subdirectory .\appveyor
- mkdir appveyor
- python --version
- python -c "import struct; print('PYTHON_ARCH:', struct.calcsize('P') << 3)"
- python -m pip install --upgrade pip
- pip --version
- if [%PYTHON_VERSION%]==[3.7.0] pip install "urllib3<2.0"
- if [%PYTHON_VERSION%]==[3.7.0] pip install -U setuptools
- if [%PYTHON_VERSION%]==[3.12.x] pip install -U setuptools
- if [%PYTHON_ARCH%]==[32] pip install "Pillow >= 8.1.2, != 10.0, != 10.1"
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
- pip install wikitextparser
build: off
test_script:
- chcp 65001
- set PYTHONIOENCODING=utf8
- "mkdir %PYWIKIBOT_DIR%"
- "python -Werror::UserWarning -m pwb generate_user_files -dir:%PYWIKIBOT_DIR% -family:wikipedia -lang:en -v -debug -user:%PYWIKIBOT_USERNAME%"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'maximum_GET_length = 5000; transliteration_target = None;')"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'noisysleep = float(''inf'');')"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikipedia''][''test''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikidata''][''test''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''commons''][''commons''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''meta''][''meta''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikisource''][''zh''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_PASSWD_FILE, ('(''{0}'', ''{1}'')\n' -f $env:PYWIKIBOT_USERNAME, $env:USER_PASSWORD))"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'password_file = ''{0}'';' -f $env:PYWIKIBOT_PASSWD_FILE.replace('\\', '\\\\'))"
- "%CMD_IN_ENV% coverage run -m unittest discover -vv -p \"*_tests.py\""
on_finish:
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
coverage report
- pip install codecov-cli
- codecovcli do-upload