Skip to content

Commit 739771d

Browse files
andrutenbrianmay
authored andcommittedNov 13, 2022
decreased codecov percentage
format envlist Separated steps as made in django-two-factor-auth Added codecov.yml Fixed pipeline name
1 parent 56c1337 commit 739771d

File tree

4 files changed

+52
-8
lines changed

4 files changed

+52
-8
lines changed
 

‎.github/workflows/test.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: Test
22

33
on:
44
- push
@@ -36,13 +36,16 @@ jobs:
3636
- name: Install dependencies
3737
run: |
3838
python -m pip install --upgrade pip
39-
python -m pip install tox tox-gh-actions
39+
python -m pip install tox tox-gh-actions codecov
4040
4141
- name: Test with tox
4242
run: |
4343
tox -v -- --cov --cov-append --cov-report term-missing --cov-report xml
4444
45+
- name: Generate coverage XML report
46+
run: coverage xml
47+
4548
- name: Upload coverage
46-
uses: codecov/codecov-action@v1
47-
with:
48-
name: Python ${{ matrix.python-version }}
49+
uses: codecov/codecov-action@v2.0.3
50+
env:
51+
PYTHON: ${{matrix.python-version}}

‎codecov.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
coverage:
2+
status:
3+
project:
4+
default: false
5+
tests:
6+
paths: tests
7+
informational: true
8+
revproxy:
9+
paths: revproxy
10+
informational: true
11+
patch: off

‎revproxy/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def set_response_headers(response, response_headers):
134134
if hasattr(response, 'headers'):
135135
logger.debug('Response headers: %s', response.headers)
136136
else:
137-
logger.debug('Response headers: %s', getattr(response, '_headers', None))
137+
logger.debug('Response headers: %s',
138+
getattr(response, '_headers', None))
138139

139140

140141
def normalize_request_headers(request):

‎tox.ini

+31-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1+
[gh-actions]
2+
python =
3+
2.7: py27
4+
3.6: py36
5+
3.7: py37
6+
3.8: py38
7+
3.9: py39
8+
3.10: py310
9+
10+
[gh-actions:env]
11+
DJANGO =
12+
2.2: dj22
13+
3.0: dj30
14+
3.1: dj31
15+
3.2: dj32
16+
4.0: dj40
17+
4.1: dj41
118

219
[tox]
3-
envlist = py{27,35,36,37}-dj{18,19,110,111},py{35,36,37,38}-dj{22},py{36,37,38}-dj{30}
20+
skipsdist = True
21+
usedevelop = True
22+
23+
envlist =
24+
py{27,35,36,37}-dj{18,19,110,111}
25+
py{35,36,37,38}-dj{22}
26+
py{36,37,38,39}-dj{30}
27+
py{36,37,38,39}-dj{31}
28+
py{36,37,38,39,310}-dj{32}
429

530
[testenv]
631
basepython =
@@ -9,6 +34,8 @@ basepython =
934
py36: python3.6
1035
py37: python3.7
1136
py38: python3.8
37+
py39: python3.9
38+
py310: python3.10
1239

1340
deps =
1441
coverage
@@ -19,8 +46,10 @@ deps =
1946
dj111: Django>=1.11,<1.11.99
2047
dj22: Django>=2.2,<2.2.99
2148
dj30: Django>=3.0,<3.0.99
49+
dj31: Django>=3.1,<3.1.99
50+
dj32: Django>=3.2,<3.2.99
2251

2352
commands =
2453
flake8 revproxy -v
2554
coverage run --branch --source=revproxy setup.py test
26-
coverage report --fail-under=100 --show-missing
55+
coverage report --fail-under=80 --show-missing

0 commit comments

Comments
 (0)
Please sign in to comment.