forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.appveyor.yml
93 lines (72 loc) · 3.22 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
image: Visual Studio 2022
clone_depth: 50
skip_tags: true
version: 8.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 of each major Python version
- PYTHON: "C:\\Python361-x64"
PYTHON_VERSION: "3.6.1"
PYTHON_ARCH: "64"
# AppVeyor pre-installs these versions onto build machines
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "32"
- 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"
matrix:
fast_finish: false
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
# Download Python 3.6.1 which isn't pre-installed
- ps: ./appveyor_install.ps1
- python --version
- python -c "import struct; print('PYTHON_ARCH' + chr(58), struct.calcsize('P') << 3)"
- pip --version
- 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, 'max_retries = 2; 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:
- codecov
artifacts:
- path: dist\* .coverage coverage.xml