forked from frerich/clcache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
83 lines (62 loc) · 2.44 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
# whitelist branches to avoid testing feature branches twice (as branch and as pull request)
branches:
only:
- master
environment:
matrix:
# AppVeyor installed Python versions
# http://www.appveyor.com/docs/installed-software#python
- PYTHON_INSTALL: "C:\\Python33"
- PYTHON_INSTALL: "C:\\Python34"
- PYTHON_INSTALL: "C:\\Python35"
install:
# Make compiler available (use MSVC 2013, 32 bit)
- call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
# Check compiler version
- cl
# Prepend Python installation to PATH
- set PATH=%PYTHON_INSTALL%;%PATH%
# Prepend Python scripts to PATH (e.g. pip, py.test, pylint)
- set PATH=%PYTHON_INSTALL%\\Scripts;%PATH%
# Check Python version
- python --version
# Install pytest
- pip install pytest
# Install pylint (installs pylint.exe in %PYTHON_INSTALL%\Scripts)
- pip install pylint
- pylint --version
# Install coverage plugin for pytest
- pip install pytest-cov
# Install tool for uploading coverage data to codecov.io
- pip install codecov
- coverage --version
build_script:
- python clcache.py --help
- python clcache.py -s
- pylint --rcfile=.pylintrc clcache.py
- pylint --rcfile=.pylintrc unittests.py
- pylint --rcfile=.pylintrc integrationtests.py
- pylint --rcfile=.pylintrc performancetests.py
test_script:
# Run test files via py.test and generate JUnit XML. Then push test results
# to appveyor. The plugin pytest-cov takes care of coverage.
- ps: |
& py.test --junitxml .\unittests.xml unittests.py --cov=clcache
$testsExitCode = $lastexitcode
& coverage report
& coverage xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\unittests.xml))
& codecov --no-color -X gcov -F unittests -e PYTHON_INSTALL
if ($testsExitCode -ne 0) {exit $testsExitCode}
- coverage erase
- del /Q coverage.xml
- ps: |
& py.test --junitxml .\integrationtests.xml integrationtests.py --cov=clcache
$testsExitCode = $lastexitcode
& coverage report
& coverage xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\integrationtests.xml))
& codecov --no-color -X gcov -F integrationtests -e PYTHON_INSTALL
if ($testsExitCode -ne 0) {exit $testsExitCode}