diff --git a/.github/file-filters.yml b/.github/file-filters.yml index 2b72ac7d..742bda50 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -20,6 +20,7 @@ doc_files: &doc_files python_all: &python_all - "**/*.py" - *poetry_files + - *ci_config yaml_all: &yaml_all - "**/*.{yml,yaml}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ed1dc30..3b529039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,7 @@ jobs: run: | pipx install poetry poetry config virtualenvs.prefer-active-python true - pip install invoke toml + pip install invoke toml codecov - name: "Install Package" run: "poetry install --all-extras" - name: "Mypy Tests" @@ -151,3 +151,8 @@ jobs: # run: "poetry run pylint infrahub_sdk/" - name: "Unit Tests" run: "poetry run pytest tests/unit/" + - name: "Upload coverage to Codecov" + run: | + codecov --flags python-${{ matrix.python-version }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 7e282500..afa7899c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,7 +144,7 @@ filterwarnings = [ "ignore:Module already imported so cannot be rewritten", "ignore:Deprecated call to", ] -addopts = "-vs --cov-report term-missing --cov-report xml --dist loadscope" +addopts = "-vs --cov infrahub_sdk --cov-report term-missing --cov-report xml --dist loadscope" [tool.mypy] pretty = true