diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000..789ee87 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,26 @@ +name: Check Coverage + +on: + pull_request: + branches: + - main + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + - name: Install Cally test dependencies + run: pip install .[test] + - name: Run Coverage + run: coverage run -m pytest + - name: Get Cover + uses: orgoro/coverage@v3.1 + with: + coverageFile: path/to/coverage.xml + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 19b8bc6..414e3c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ license = {file = "LICENSE.md"} [project.optional-dependencies] development = [ "black", + "coverage", "isort", "mypy", "pytest", @@ -31,6 +32,7 @@ development = [ ] test = [ "black", + "coverage", "mypy", "pytest", "pytest-black",