Skip to content

Commit

Permalink
fix upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoopmans committed Aug 10, 2024
1 parent 121bcf5 commit ceec757
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,28 @@ jobs:
container:
image: python:2.7.18-buster
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install -r requirements.txt && \
python -m pip install -r requirements_dev.txt
- name: Test with pytest and coverage
run: |
pytest --cov=cert_chain_resolver --cov-report=xml --cov-report=term-missing
pytest --cov=cert_chain_resolver --cov-report=term-missing
- name: Upload coverage artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: coverage-2.7
path: coverage.xml
path: .coverage

Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -50,21 +46,21 @@ jobs:
python -m pip install -r requirements_dev.txt
- name: Test with pytest and coverage
run: |
pytest --cov=cert_chain_resolver --cov-report=xml --cov-report=term-missing
pytest --cov=cert_chain_resolver --cov-report=term-missing
- name: Upload coverage artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
path: .coverage

combine-coverage:
runs-on: ubuntu-latest
needs:
- Test
- Test-python-27
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -73,18 +69,21 @@ jobs:
run: |
python -m pip install coverage codecov
- name: Download coverage artifacts
run: |
for version in 2.7 3.7 3.8 3.9 3.10 3.11 3.12; do
echo "Downloading coverage for Python $version"
actions/download-artifact@v4 --name coverage-$version --path ./coverage/$version
done
uses: actions/download-artifact@v4
with:
pattern: coverage-*
path: .coverage
- name: Combine coverage reports
run: |
coverage combine ./coverage
ls -lashR .
coverage combine .coverage/*/.coverage
coverage report
coverage xml
coverage html --skip-covered --skip-empty
coverage xml --skip-covered --skip-empty -o combined_coverage.xml
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
mypy:
Expand Down

0 comments on commit ceec757

Please sign in to comment.