Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add upload to code cov #101

Merged
merged 1 commit into from
Apr 17, 2024
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
17 changes: 16 additions & 1 deletion .github/workflows/test-python-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ on:
type: string
required: false
default: "."
codecov-slug:
description: "The slug provided to Codecov for the coverage report."
type: string
required: true
codecov-yml-path:
description: "The path of the Codecov YAML file."
type: string
required: false
default: "./codecov.yml"

jobs:
test-py-code:
Expand Down Expand Up @@ -95,4 +104,10 @@ jobs:
working-directory: ${{ inputs.working-directory }}
run: pipenv run pytest -n=auto -c=${{ env.PYPROJECT_TOML }} ${{ inputs.source-path }}

# TODO: assert code coverage target.
- name: 📈 Upload Coverage Reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ inputs.codecov-slug }}
codecov_yml_path: ${{ inputs.codecov-yml-path }}
working-directory: ${{ inputs.working-directory }}