Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/libraries_report-size-deltas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
env:
PYTHON_PROJECT_PATH: ${GITHUB_WORKSPACE}/reportsizedeltas
PYTHON_PROJECT_TESTS_PATH: ${GITHUB_WORKSPACE}/reportsizedeltas/tests
COVERAGE_DATA_FILENAME: coverage.xml

steps:
- name: Checkout
Expand All @@ -39,14 +40,18 @@ jobs:
pip install --quiet pep8-naming
flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}"

- name: Run Python unit tests and report code coverage
- name: Run Python unit tests and record code coverage data
run: |
export PYTHONPATH="${{ env.PYTHON_PROJECT_PATH }}"
coverage run --source="${{ env.PYTHON_PROJECT_PATH }}" --module pytest "${{ env.PYTHON_PROJECT_TESTS_PATH }}"
# Display code coverage report in workflow run log
coverage report
# Generate coverage data file for consumption by `codecov/codecov-action`.
coverage xml -o "${{ github.workspace }}/${{ env.COVERAGE_DATA_FILENAME }}"

- name: Display code coverage report
run: coverage report

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
file: ${{ env.COVERAGE_DATA_FILENAME }}
fail_ci_if_error: true