Skip to content

Commit 1aebe86

Browse files
authored
Merge pull request #18 from per1234/bump-codecov-action
Bump codecov/codecov-action to v2
2 parents 8c46bbd + 5fab803 commit 1aebe86

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/libraries_report-size-deltas.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
env:
1919
PYTHON_PROJECT_PATH: ${GITHUB_WORKSPACE}/reportsizedeltas
2020
PYTHON_PROJECT_TESTS_PATH: ${GITHUB_WORKSPACE}/reportsizedeltas/tests
21+
COVERAGE_DATA_FILENAME: coverage.xml
2122

2223
steps:
2324
- name: Checkout
@@ -39,14 +40,18 @@ jobs:
3940
pip install --quiet pep8-naming
4041
flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}"
4142
42-
- name: Run Python unit tests and report code coverage
43+
- name: Run Python unit tests and record code coverage data
4344
run: |
4445
export PYTHONPATH="${{ env.PYTHON_PROJECT_PATH }}"
4546
coverage run --source="${{ env.PYTHON_PROJECT_PATH }}" --module pytest "${{ env.PYTHON_PROJECT_TESTS_PATH }}"
46-
# Display code coverage report in workflow run log
47-
coverage report
47+
# Generate coverage data file for consumption by `codecov/codecov-action`.
48+
coverage xml -o "${{ github.workspace }}/${{ env.COVERAGE_DATA_FILENAME }}"
49+
50+
- name: Display code coverage report
51+
run: coverage report
4852

4953
- name: Upload coverage report to Codecov
50-
uses: codecov/codecov-action@v1
54+
uses: codecov/codecov-action@v2
5155
with:
56+
file: ${{ env.COVERAGE_DATA_FILENAME }}
5257
fail_ci_if_error: true

0 commit comments

Comments
 (0)