File tree 5 files changed +47
-7
lines changed
5 files changed +47
-7
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # Docs: https://coverage.readthedocs.org/en/latest/config.html
3
+
4
+ [run]
5
+ branch = False
6
+
7
+ # If True, stores relative file paths in data file (needed for Github Actions).
8
+ # Using this parameter requires coverage>=5.0
9
+ relative_files = True
Original file line number Diff line number Diff line change @@ -32,16 +32,36 @@ jobs:
32
32
steps :
33
33
- uses : actions/checkout@v2
34
34
- name : Set up Python Env
35
- uses : actions/setup-python@v2.1.4 # FIXME: Use "v2" tag once https://github.com/actions/setup-python/issues/171 is resolved.
35
+ uses : actions/setup-python@v2
36
36
with :
37
37
python-version : ${{ matrix.python-version }}
38
38
- name : Display Python version
39
39
run : python -c "import sys; print(sys.version)"
40
40
- name : Install dependencies
41
41
run : |
42
- pip install pytest==3.2.1 pytest-cov==2.5.1
42
+ make init
43
43
- name : Run Tests
44
+ run : |
45
+ make test
46
+ - name : Upload to Coveralls
44
47
env :
45
- PYTHONHASHSEED : " 0"
48
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49
+ COVERALLS_PARALLEL : true
50
+ COVERALLS_FLAG_NAME : " ${{ matrix.os }}_${{ matrix.python-version }}"
46
51
run : |
47
- pytest --cov=vpk tests
52
+ coveralls --service=github
53
+
54
+ coveralls :
55
+ name : Finish Coveralls
56
+ needs : test
57
+ runs-on : ubuntu-latest
58
+ container : python:3-slim
59
+ steps :
60
+ - name : Install coveralls
61
+ run : |
62
+ pip3 install --upgrade coveralls
63
+ - name : Send coverage finish to coveralls.io
64
+ env :
65
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
+ run : |
67
+ coveralls --finish
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ help:
16
16
@echo " $$ HELPBODY"
17
17
18
18
init :
19
- pip install pytest==3.2.1 pytest-cov==2.5.1
19
+ pip install -r requirements.txt
20
20
21
21
test :
22
22
rm -f .coverage vpk/* .pyc tests/* .pyc
23
- PYTHONHASHSEED=0 pytest --cov=vpk tests
23
+ PYTHONHASHSEED=0 pytest --tb=short --cov-config .coveragerc -- cov=vpk tests
24
24
25
25
pylint :
26
26
pylint -r n -f colorized vpk || true
Original file line number Diff line number Diff line change 1
- | |pypi| |license| |master_build|
1
+ | |pypi| |license| |coverage| | master_build|
2
2
| |sonar_maintainability| |sonar_reliability| |sonar_security|
3
3
4
4
VPK is Valve's file format for storing game assets.
@@ -124,6 +124,10 @@ Check out https://github.com/SteamDatabase/ValveResourceFormat/
124
124
:target: https://pypi.python.org/pypi/vpk
125
125
:alt: MIT License
126
126
127
+ .. |coverage | image :: https://img.shields.io/coveralls/ValvePython/vpk/master.svg?style=flat
128
+ :target: https://coveralls.io/r/ValvePython/vpk?branch=master
129
+ :alt: Test coverage
130
+
127
131
.. |master_build | image :: https://github.com/ValvePython/vpk/workflows/Tests/badge.svg?branch=master
128
132
:target: https://github.com/ValvePython/vpk/actions?query=workflow%3A%22Tests%22+branch%3Amaster
129
133
:alt: Build status of master branch
Original file line number Diff line number Diff line change
1
+
2
+ coverage >= 5.0 ; python_version == '2.7' or python_version >= '3.5'
3
+ pytest-cov >= 2.7.0 ; python_version == '2.7' or python_version >= '3.5'
4
+
5
+ # coveralls 2.0 has removed support for Python 2.7 and 3.4
6
+ git+https://github.com/andy-maier/coveralls-python.git@andy/add-py27#egg=coveralls; python_version == '2.7'
7
+ coveralls >= 2.1.2 ; python_version >= '3.5'
You can’t perform that action at this time.
0 commit comments