Skip to content

Commit 7320e74

Browse files
authored
Merge pull request #67 from opsmill/pog-code-cov
Upload coverage reports to codecov
2 parents 4fb041f + e6503b8 commit 7320e74

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/file-filters.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ doc_files: &doc_files
2020
python_all: &python_all
2121
- "**/*.py"
2222
- *poetry_files
23+
- *ci_config
2324

2425
yaml_all: &yaml_all
2526
- "**/*.{yml,yaml}"

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
run: |
143143
pipx install poetry
144144
poetry config virtualenvs.prefer-active-python true
145-
pip install invoke toml
145+
pip install invoke toml codecov
146146
- name: "Install Package"
147147
run: "poetry install --all-extras"
148148
- name: "Mypy Tests"
@@ -151,3 +151,8 @@ jobs:
151151
# run: "poetry run pylint infrahub_sdk/"
152152
- name: "Unit Tests"
153153
run: "poetry run pytest tests/unit/"
154+
- name: "Upload coverage to Codecov"
155+
run: |
156+
codecov --flags python-${{ matrix.python-version }}
157+
env:
158+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ filterwarnings = [
144144
"ignore:Module already imported so cannot be rewritten",
145145
"ignore:Deprecated call to",
146146
]
147-
addopts = "-vs --cov-report term-missing --cov-report xml --dist loadscope"
147+
addopts = "-vs --cov infrahub_sdk --cov-report term-missing --cov-report xml --dist loadscope"
148148

149149
[tool.mypy]
150150
pretty = true

0 commit comments

Comments
 (0)