{"id":7795044,"name":"JotaFan/pycoverage","ecosystem":"actions","description":"Check pytest coverage and fail if tests failed or file and/or total coverage below threshold.","homepage":"","licenses":"mit","normalized_licenses":["MIT"],"repository_url":"https://github.com/JotaFan/pycoverage","keywords_array":["coverage","coverage-testing","python"],"namespace":"JotaFan","versions_count":3,"first_release_published_at":"2023-05-25T15:29:27.000Z","latest_release_published_at":"2024-11-20T16:57:46.000Z","latest_release_number":"v1.1.1","last_synced_at":"2026-09-17T23:37:20.155Z","created_at":"2023-05-25T18:18:36.319Z","updated_at":"2026-09-22T02:56:07.716Z","registry_url":"https://github.com/JotaFan/pycoverage","install_command":null,"documentation_url":null,"metadata":{"name":"pycoverage","author":"João Santos","description":"Check pytest coverage and fail if tests failed or file and/or total coverage below threshold.","branding":{"color":"purple","icon":"check-square"},"inputs":{"requirements-file":{"description":"Path to the requirements file if you use pip. ./requirements.txt by default","required":false,"default":"./requirements.txt"},"pytest-root-dir":{"description":"root directory to recursively search for .py files","required":false,"default":"."},"pytest-tests-dir":{"description":"directory with pytest tests. if left empty will identify test(s) dir by default","required":false,"default":"./"},"cov-omit-list":{"description":"list of directories and/or files to ignore","required":false,"default":""},"cov-threshold-single":{"description":"fail if any single file coverage is less than threshold","required":false,"default":0},"cov-threshold-total":{"description":"fail if the total coverage is less than threshold","required":false,"default":0},"async-tests":{"description":"Add support for async tests","required":false,"default":false},"poetry-groups":{"description":"Poetry group names with the dependencies for the tests.","required":false,"default":"dev,tests"},"package-extras":{"description":"Package extras with the dependencies for the tests, or dev-requirement file if pip","required":false,"default":"dev,tests"},"output":{"description":"Output path to write the coverage badge.","required":false,"default":"badges/coverage.svg"},"overwrite":{"description":"Overwrite an existing coverage badge.","required":false,"default":"true"},"github_token":{"description":"GitHub writing token","required":false,"default":""},"working_branch":{"description":"Working branch","required":false,"default":"main"},"commit_badge":{"description":"Boolean to either make a commit on the coverage badge or not","required":false,"default":false},"poetry-version":{"description":"Version of poetry. Latest if not specified.","required":false}},"outputs":{"output-table":{"description":"pytest-cov markdown output table"},"cov-threshold-single-fail":{"description":"boolean if any single file coverage less than cov-threshold-single"},"cov-threshold-total-fail":{"description":"boolean if total coverage less than cov-threshold-total"}},"runs":{"using":"composite","steps":[{"id":"copy-coverage-processor","run":"cp ${{ github.action_path }}/coverage_handler.py ./coverage_handler","shell":"bash"},{"id":"run-tests","run":"${{ github.action_path }}/entrypoint.sh \\\n\"${{ inputs.requirements-file }}\" \\\n\"${{ inputs.pytest-root-dir }}\" \\\n\"${{ inputs.pytest-tests-dir }}\" \\\n\"${{ inputs.cov-omit-list }}\" \\\n${{ inputs.cov-threshold-single }} \\\n${{ inputs.cov-threshold-total }} \\\n${{ inputs.async-tests }} \\\n${{ inputs.poetry-groups }} \\\n${{ inputs.package-extras }} \\\n${{ inputs.output }} \\\n${{ inputs.overwrite }} \\\n${{ inputs.poetry-version }} \\\n","shell":"bash"},{"run":"echo \"SHORT_SHA=`echo ${{github.event.after}} | cut -c1-7`\" \u003e\u003e $GITHUB_ENV\necho \"PULL_NUMBER=`echo ${{ github.event.pull_request.number }}`\" \u003e\u003e $GITHUB_ENV\necho \"COMMIT_URL=`echo https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}/commits/${{ github.event.after }}`\" \u003e\u003e $GITHUB_ENV\n","shell":"bash"},{"uses":"peter-evans/find-comment@v2.4.0","if":"${{ env.PULL_NUMBER }}","id":"fc","with":{"issue-number":"${{ github.event.pull_request.number }}","comment-author":"github-actions[bot]","direction":"last"}},{"uses":"peter-evans/create-or-update-comment@v3.0.1","if":"${{ env.PULL_NUMBER }}","with":{"issue-number":"${{env.PULL_NUMBER}}","comment-id":"${{ steps.fc.outputs.comment-id }}","body":"## Tests coverage table for [${{ env.SHORT_SHA }}](${{ env.COMMIT_URL }}) commit.\n${{ steps.run-tests.outputs.output-table }}\n","edit-mode":"replace"}},{"name":"Commit pytest coverage table","if":"${{ !env.PULL_NUMBER }}","uses":"peter-evans/commit-comment@v2.0.1","with":{"body":"${{ steps.run-tests.outputs.output-table }}"}},{"name":"Verify Changed files","if":"inputs.commit_badge == 'true'","uses":"tj-actions/verify-changed-files@v14","id":"verify-changed-files","with":{"files":"docs/build/html/*\n"}},{"name":"Commit files","if":"${{ (steps.verify-changed-files.outputs.files_changed == 'true') \u0026\u0026 (inputs.commit_badge == 'true') }}","run":"git config --local user.email \"github-actions[bot]@users.noreply.github.com\"\ngit config --local user.name \"github-actions[bot]\"\ngit add \"${{ inputs.output }}\"\ngit commit -m \"chore: updating coverage.svg\" --no-verify\n","shell":"bash"},{"name":"Push changes","if":"${{ (steps.verify-changed-files.outputs.files_changed == 'true') \u0026\u0026 (inputs.commit_badge == 'true') }}","uses":"ad-m/github-push-action@master","with":{"github_token":"${{ inputs.github_token }}","branch":"${{ inputs.working_branch }}","force_with_lease":true}},{"id":"check-threashold","run":"if [ \"${{ steps.run-tests.outputs.cov-threshold-single-fail }}\" == \"true\" ]; then\n  echo \"cov single fail ${{ steps.run-tests.outputs.cov-threshold-single-fail }}\";\n  exit 1;\nelif [ \"${{ steps.run-tests.outputs.cov-threshold-total-fail }}\"  == \"true\" ]; then\n  echo \"cov single fail ${{ steps.run-tests.outputs.cov-threshold-total-fail }}\";\n  exit 1;\nfi\n","shell":"bash"}]},"default_branch":"main","path":null},"repo_metadata":{"id":169422501,"uuid":"645355662","full_name":"JotaFan/pycoverage","owner":"JotaFan","description":"A GitHub action to provide pytest coverage reporting. Works with pyproject.toml or setuptools based projects.","archived":false,"fork":false,"pushed_at":"2024-11-21T18:24:04.000Z","size":27,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-09-18T07:49:25.650Z","etag":null,"topics":["coverage","coverage-testing","python"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JotaFan.png","metadata":{},"created_at":"2023-05-25T13:21:05.000Z","updated_at":"2026-02-26T10:23:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5491117-b144-46c2-9bdb-5c721b6e0ba7","html_url":"https://github.com/JotaFan/pycoverage","commit_stats":null,"previous_names":["jotafan/pycoverage"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/JotaFan/pycoverage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JotaFan","download_url":"https://codeload.github.com/JotaFan/pycoverage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/sbom","scorecard":{"id":75000,"data":{"date":"2025-08-11","repo":{"name":"github.com/JotaFan/pycoverage","commit":"4cbb8fff56cf974eabdcd0cf3d690acbc4e1efec"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 3/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/post-commit.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/post-commit.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/JotaFan/pycoverage/post-commit.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/post-commit.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/JotaFan/pycoverage/post-commit.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/post-commit.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/JotaFan/pycoverage/post-commit.yml/main?enable=pin","Warn: pipCommand not pinned by hash: entrypoint.sh:38","Warn: pipCommand not pinned by hash: entrypoint.sh:41","Warn: pipCommand not pinned by hash: entrypoint.sh:70","Warn: pipCommand not pinned by hash: entrypoint.sh:76","Warn: pipCommand not pinned by hash: entrypoint.sh:79","Warn: pipCommand not pinned by hash: entrypoint.sh:81","Warn: pipCommand not pinned by hash: entrypoint.sh:105","Warn: pipCommand not pinned by hash: entrypoint.sh:146","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   8 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T04:37:32.736Z","repository_id":169422501,"created_at":"2025-08-15T04:37:32.736Z","updated_at":"2025-08-15T04:37:32.736Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":341189360,"owners_count":37576432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-09-22T02:00:07.665Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"},"owner_record":{"login":"JotaFan","name":"João Santos","uuid":"23263893","kind":"user","description":"","email":"","website":null,"location":"Lisboa","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/23263893?u=59e4d46b36c8619a97d10363cbfe7429f8e46ec6\u0026v=4","repositories_count":1,"last_synced_at":"2023-05-16T12:28:51.294Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/JotaFan","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2023-05-16T12:28:51.300Z","updated_at":"2023-05-16T12:28:51.300Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JotaFan","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JotaFan/repositories"},"tags":[{"name":"v1.1.1","sha":"4cbb8fff56cf974eabdcd0cf3d690acbc4e1efec","kind":"commit","published_at":"2024-11-20T16:57:46.000Z","download_url":"https://codeload.github.com/JotaFan/pycoverage/tar.gz/v1.1.1","html_url":"https://github.com/JotaFan/pycoverage/releases/tag/v1.1.1","dependencies_parsed_at":"2024-12-06T12:09:08.529Z","dependency_job_id":null,"purl":"pkg:github/JotaFan/pycoverage@v1.1.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.1.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.1.1/manifests"},{"name":"v1.1.0","sha":"e3e5ae20d7ef09a7c7659757c5fa3d8956f90712","kind":"commit","published_at":"2023-06-02T10:35:02.000Z","download_url":"https://codeload.github.com/JotaFan/pycoverage/tar.gz/v1.1.0","html_url":"https://github.com/JotaFan/pycoverage/releases/tag/v1.1.0","dependencies_parsed_at":null,"dependency_job_id":"38763f01-c32e-43aa-b7fd-0cc712641014","purl":"pkg:github/JotaFan/pycoverage@v1.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.1.0/manifests"},{"name":"v1.0.0","sha":"d3acfa19f3f03ae57af909ddfd02b19810406bf4","kind":"commit","published_at":"2023-05-25T15:29:27.000Z","download_url":"https://codeload.github.com/JotaFan/pycoverage/tar.gz/v1.0.0","html_url":"https://github.com/JotaFan/pycoverage/releases/tag/v1.0.0","dependencies_parsed_at":"2023-06-01T00:08:29.917Z","dependency_job_id":null,"purl":"pkg:github/JotaFan/pycoverage@v1.0.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.0.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/tags/v1.0.0/manifests"}]},"repo_metadata_updated_at":"2026-09-22T02:56:07.716Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":1,"rankings":{"downloads":null,"dependent_repos_count":24.794802725400096,"dependent_packages_count":0.0,"stargazers_count":27.409285374742513,"forks_count":21.698621454603074,"docker_downloads_count":null,"average":18.47567738868642},"purl":"pkg:githubactions/JotaFan/pycoverage","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/JotaFan/pycoverage","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/JotaFan/pycoverage","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/JotaFan/pycoverage/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2026-01-17T16:55:24.248Z","issues_count":7,"pull_requests_count":5,"avg_time_to_close_issue":386323.6,"avg_time_to_close_pull_request":666048.5,"issues_closed_count":5,"pull_requests_closed_count":4,"pull_request_authors_count":3,"issue_authors_count":4,"avg_comments_per_issue":0.14285714285714285,"avg_comments_per_pull_request":0.6,"merged_pull_requests_count":4,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/JotaFan%2Fpycoverage/issues","maintainers":[{"login":"JotaFan","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/JotaFan"},{"login":"marc-portier","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/marc-portier"}],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/JotaFan%2Fpycoverage/codemeta","maintainers":[]}