@@ -14,32 +14,28 @@ jobs:
14
14
container :
15
15
image : python:2.7.18-buster
16
16
steps :
17
- - uses : actions/checkout@v3
18
- - name : Set up Python ${{ matrix.python-version }}
19
- uses : actions/setup-python@v4
20
- with :
21
- python-version : ${{ matrix.python-version }}
17
+ - uses : actions/checkout@v4
22
18
- name : Install dependencies
23
19
run : |
24
20
python -m pip install -r requirements.txt && \
25
21
python -m pip install -r requirements_dev.txt
26
22
- name : Test with pytest and coverage
27
23
run : |
28
- pytest --cov=cert_chain_resolver --cov-report=xml --cov-report= term-missing
24
+ pytest --cov=./ cert_chain_resolver --cov-report term-missing -n auto
29
25
- name : Upload coverage artifact
30
26
if : success()
31
27
uses : actions/upload-artifact@v4
32
28
with :
33
29
name : coverage-2.7
34
- path : coverage.xml
30
+ path : .coverage
35
31
36
32
Test :
37
33
runs-on : ubuntu-latest
38
34
strategy :
39
35
matrix :
40
36
python-version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
41
37
steps :
42
- - uses : actions/checkout@v3
38
+ - uses : actions/checkout@v4
43
39
- name : Set up Python ${{ matrix.python-version }}
44
40
uses : actions/setup-python@v4
45
41
with :
@@ -50,21 +46,21 @@ jobs:
50
46
python -m pip install -r requirements_dev.txt
51
47
- name : Test with pytest and coverage
52
48
run : |
53
- pytest --cov=cert_chain_resolver --cov-report=xml --cov-report= term-missing
49
+ pytest --cov=./ cert_chain_resolver --cov-report term-missing -n auto
54
50
- name : Upload coverage artifact
55
51
if : success()
56
52
uses : actions/upload-artifact@v4
57
53
with :
58
54
name : coverage-${{ matrix.python-version }}
59
- path : coverage.xml
55
+ path : .coverage
60
56
61
57
combine-coverage :
62
58
runs-on : ubuntu-latest
63
59
needs :
64
60
- Test
65
61
- Test-python-27
66
62
steps :
67
- - uses : actions/checkout@v3
63
+ - uses : actions/checkout@v4
68
64
- name : Set up Python
69
65
uses : actions/setup-python@v4
70
66
with :
@@ -73,20 +69,24 @@ jobs:
73
69
run : |
74
70
python -m pip install coverage codecov
75
71
- name : Download coverage artifacts
76
- run : |
77
- for version in 2.7 3.7 3.8 3.9 3.10 3.11 3.12; do
78
- echo "Downloading coverage for Python $version"
79
- actions/download-artifact@v4 --name coverage-$version --path ./coverage/$version
80
- done
72
+ uses : actions/download-artifact@v4
73
+ with :
74
+ pattern : coverage-*
81
75
- name : Combine coverage reports
82
76
run : |
83
- coverage combine ./coverage
77
+ ls -lashR .
78
+ set -x
79
+ coverage combine coverage-*/.coverage
84
80
coverage report
85
- coverage xml
81
+ coverage html --skip-covered --skip-empty
82
+ coverage xml -o combined_coverage.xml
83
+
84
+ coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
86
85
- name : Upload coverage to Codecov
87
- uses : codecov/codecov-action@v3
86
+ uses : codecov/codecov-action@v4
88
87
with :
89
- file : ./coverage.xml
88
+ file : ./combined_coverage.xml
89
+ token : ${{ secrets.CODECOV_TOKEN }}
90
90
mypy :
91
91
runs-on : ubuntu-latest
92
92
strategy :
0 commit comments