Skip to content

Instantly share code, notes, and snippets.

@twyle
Created June 13, 2022 08:53
Show Gist options
  • Save twyle/306b7bcd2367d5eed9fab3f85936c7d8 to your computer and use it in GitHub Desktop.
Save twyle/306b7bcd2367d5eed9fab3f85936c7d8 to your computer and use it in GitHub Desktop.

oryks-code-coverage

This GitHub Action shows Code Coverage for a given project.

security: bandit Imports: isort made-with-python GitHub license Medium Visual Studio Code Ubuntu

This GitHub Action shows code Coverage for a given python project using Pytest Coverage. To use this action, your project must have tests written using pytest and stored in a test folder. You can read about how it was developed over at How To Create a GitHub Action that Shows Code Coverage using Pytest

This action shows code coverage using pytest coverage. To read about how it was developed, check out How To Create a GitHub Action that Shows Code Coverage using Pytest.

Inputs

codedirectory

Required The directory containing the source code. Default ".".

testdirectory

Required The directory containing the tests. Default "tests\".

pycovconfigfile

Optional The pycov configuration file Default ".coveragerc".

pytestconfigfile

Optional The pytest configuration file. Default "setup.cfg".

Outputs

testcoverage

The Test coverage

Example usage

- name: oryks code coverage action
  id: selftest
  uses: twyle/[email protected]
  with:
    codedirectory: src/
    testdirectory: tests/
    github_token: ${{ github.token }}

- name: action output
  run: |
    echo "${{ steps.selftest.outputs.testcoverage }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment