forked from raczben/wexpect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
69 lines (59 loc) · 2.83 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
# appveyor.yml
---
environment:
# Encrypted password (more precisely: token) for upload distro to pypy:
# The "pypipw" is a custom name.
# The original (sensitive) token is generated by the pypi: https://pypi.org/manage/account/token/
# The token has encripted by the appveyor: https://ci.appveyor.com/tools/encrypt
pypipw:
secure: N+tYP6JrVCZ12LX7MUmHYJ8kx07F4A1hXtmEW01RmhrrQBdylIf0SO/eEfW5f4ox3S4xG/lgGSzNlZckvgifrsYeeBkWwoSH5/AJ3SnOJ7HBVojVt2t3bAznS6x3aPT7WDpwGN7piwus9aHSmpKaOzRoEOBKfgHv3aUzb907C0d0Yr12LU/4cIoTAn7jMziifSq45Z50lsQwzYic/VkarxTh+GXuCCm1Mb8F686H8i6Smm1Q1n9BsXowYnzwdrTZSBVOUtpd48Mh9JKgSNhfmQ==
testpypipw:
secure: CcyBI8e/2LdIT2aYIytTAgR4795DNBDM/ztsz1kqZYYOeNc3zlJWLdYWrnjCHn5W6/ZcAHrsxCdCMHvtr6PIVgBRpl2RR3fk2jKTzKqJJsLW871q30BsE0kws32f1IiqfjVtLn8BUC91IJ2xBBXtOYktf1tCMi3zJMSF9+MIOQKIu298bIRnD1Lc+4lzcSZJOn4I7dOMdzlcCMRqhtO58TGwR/hD+22FHjyWVB8nLL18AO+XXS9lHSOUrH6rD5NYvVFZD68oV/RrCGAjRmfMnw==
# Set default pytohn, the matrinx is in the tox settings.
PYTHON: "C:\\Python37"
build: on
build_script:
# Create source distribution.
- cmd: |
"%PYTHON%/python.exe" -m pip install --upgrade pip
"%PYTHON%/python.exe" -m pip install --upgrade setuptools wheel
"%PYTHON%/python.exe" -m setup sdist
install:
- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- pip install .[test]
test_script:
- tox
after_test:
# Upload code coverage results.
# https://github.com/codecov/codecov-python/issues/158#issuecomment-514282362
- for %%f in (*coverage.xml) do (
(codecov --no-color -X gcov --file %%f --required ) || (sleep 30 && codecov --no-color -X gcov --file %%f --required )
)
# fill .pypirc file.
# pypi
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
- cmd: "echo repository: https://upload.pypi.org/legacy/ >> %USERPROFILE%\\.pypirc"
- cmd: "echo username: __token__ >> %USERPROFILE%\\.pypirc"
- cmd: "echo password: %pypipw% >> %USERPROFILE%\\.pypirc"
# testpypi
- cmd: "echo [testpypi] >> %USERPROFILE%\\.pypirc"
- cmd: "echo repository: https://test.pypi.org/legacy/ >> %USERPROFILE%\\.pypirc"
- cmd: "echo username: __token__ >> %USERPROFILE%\\.pypirc"
- cmd: "echo password: %testpypipw% >> %USERPROFILE%\\.pypirc"
artifacts:
- path: dist\wexpect*.tar.gz
name: wexpect-source-distro
deploy_script:
# Upload to pypi.
# More precisely. The master and release builds will be uploaded to pypi. Test branch will be
# uploaded to test-pypi the test builds.
# See more at https://stackoverflow.com/a/39155147/2506522
- IF %APPVEYOR_REPO_BRANCH%==master (
twine upload -r pypi dist\\wexpect*.tar.gz
)
- IF %APPVEYOR_REPO_TAG%==true (
twine upload -r pypi dist\\wexpect*.tar.gz
)
- IF %APPVEYOR_REPO_BRANCH%==test (
twine upload -r testpypi dist\\wexpect*.tar.gz
)