diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 0000000..8634ded --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,41 @@ +name: Test Coverage + +on: + push + pull_request + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Install Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Poetry + uses: Gr1N/setup-poetry@v8 + with: + poetry-version: '1.8.3' + + - name: Install dependencies + run: poetry install + + - name: Run tests coverage + run: | + poetry run pytest + poetry run coverage report + poetry run coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true diff --git a/coverage.xml b/coverage.xml new file mode 100644 index 0000000..fe4d210 --- /dev/null +++ b/coverage.xml @@ -0,0 +1,366 @@ + + + + + + C:\opensource\OSIPI\pypi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/poetry.lock b/poetry.lock index 8056b5a..ca4c254 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2522,4 +2522,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "608e89b569d110e0ca49063cde4d915ed83b59b633806f5190f219f5218ed69c" +content-hash = "0c11643e5fa1754a4ac302b0313336b90a8f81181cffbb55fa2e27b8e099ada1" diff --git a/pyproject.toml b/pyproject.toml index ed0db06..a91ce00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,8 @@ matplotlib = "3.9.0" requests = "^2.32.3" semantic-version = "^2.10.0" toml = "^0.10.2" +coverage = "^7.6.1" +pytest-cov = "^5.0.0" [tool.setuptools.packages.find] where = [ "src",]