Skip to content

Commit c6a32a1

Browse files
committed
fix upload
1 parent 121bcf5 commit c6a32a1

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[run]
2+
relative_files = True
3+
source = cert_chain_resolver
4+
5+
[paths]
6+
source =
7+
cert_chain_resolver
8+
*/cert_chain_resolver

.github/workflows/ci-cd.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,28 @@ jobs:
1414
container:
1515
image: python:2.7.18-buster
1616
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
2218
- name: Install dependencies
2319
run: |
2420
python -m pip install -r requirements.txt && \
2521
python -m pip install -r requirements_dev.txt
2622
- name: Test with pytest and coverage
2723
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
2925
- name: Upload coverage artifact
3026
if: success()
3127
uses: actions/upload-artifact@v4
3228
with:
3329
name: coverage-2.7
34-
path: coverage.xml
30+
path: .coverage
3531

3632
Test:
3733
runs-on: ubuntu-latest
3834
strategy:
3935
matrix:
4036
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
4137
steps:
42-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
4339
- name: Set up Python ${{ matrix.python-version }}
4440
uses: actions/setup-python@v4
4541
with:
@@ -50,21 +46,21 @@ jobs:
5046
python -m pip install -r requirements_dev.txt
5147
- name: Test with pytest and coverage
5248
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
5450
- name: Upload coverage artifact
5551
if: success()
5652
uses: actions/upload-artifact@v4
5753
with:
5854
name: coverage-${{ matrix.python-version }}
59-
path: coverage.xml
55+
path: .coverage
6056

6157
combine-coverage:
6258
runs-on: ubuntu-latest
6359
needs:
6460
- Test
6561
- Test-python-27
6662
steps:
67-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6864
- name: Set up Python
6965
uses: actions/setup-python@v4
7066
with:
@@ -73,20 +69,24 @@ jobs:
7369
run: |
7470
python -m pip install coverage codecov
7571
- 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-*
8175
- name: Combine coverage reports
8276
run: |
83-
coverage combine ./coverage
77+
ls -lashR .
78+
set -x
79+
coverage combine coverage-*/.coverage
8480
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
8685
- name: Upload coverage to Codecov
87-
uses: codecov/codecov-action@v3
86+
uses: codecov/codecov-action@v4
8887
with:
89-
file: ./coverage.xml
88+
file: ./combined_coverage.xml
89+
token: ${{ secrets.CODECOV_TOKEN }}
9090
mypy:
9191
runs-on: ubuntu-latest
9292
strategy:

0 commit comments

Comments
 (0)