Skip to content

Commit 5a3778f

Browse files
committed
chore(ci): fix codecov upload commit SHA and coverage source paths
Override commit SHA to use PR head instead of merge commit, pass PR number explicitly, and strip Docker /data/ prefix from coverage XML source paths so Codecov can match files to the repo. JIRA: trivial risk: nonprod
1 parent 2375c23 commit 5a3778f

16 files changed

Lines changed: 73 additions & 7 deletions

File tree

.github/workflows/rw-collect-changes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- 'docs/**'
4040
python-modules:
4141
- '.docker/**'
42+
- '.github/workflows/**'
4243
- 'packages/**'
4344
- '*.mk'
4445
- 'Makefile'

.github/workflows/rw-python-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
with:
2727
files: ./packages/gooddata-sdk/coverage.xml,./packages/gooddata-pandas/coverage.xml,./packages/gooddata-fdw/coverage.xml,./packages/gooddata-flight-server/coverage.xml,./packages/gooddata-flexconnect/coverage.xml,./packages/gooddata-dbt/coverage.xml,./packages/gooddata-pipelines/coverage.xml
2828
token: ${{ secrets.CODECOV_TOKEN }}
29+
override_commit: ${{ github.event.pull_request.head.sha || github.sha }}
30+
override_pr: ${{ github.event.number }}
2931
lint-and-format-check:
3032
runs-on: ubuntu-latest
3133
if: ${{inputs.changed-python-modules == 'true'}}

packages/gooddata-dbt/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ allowed-unresolved-imports = ["deep_translator", "github"]
4747
[tool.hatch.build.targets.wheel]
4848
packages = ["src/gooddata_dbt"]
4949

50+
[tool.coverage.run]
51+
source = ["gooddata_dbt"]
52+
53+
[tool.coverage.paths]
54+
source = [
55+
"src/gooddata_dbt",
56+
"**/site-packages/gooddata_dbt",
57+
]
58+
5059
[build-system]
5160
requires = ["hatchling"]
5261
build-backend = "hatchling.build"

packages/gooddata-dbt/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ dependency_groups =
1111
setenv =
1212
COVERAGE_CORE=sysmon
1313
commands =
14-
pytest -v --cov=src/gooddata_dbt --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
14+
pytest -v --cov --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

packages/gooddata-fdw/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ allowed-unresolved-imports = ["multicorn"]
6565
[tool.hatch.build.targets.wheel]
6666
packages = ["src/gooddata_fdw"]
6767

68+
[tool.coverage.run]
69+
source = ["gooddata_fdw"]
70+
71+
[tool.coverage.paths]
72+
source = [
73+
"src/gooddata_fdw",
74+
"**/site-packages/gooddata_fdw",
75+
]
76+
6877
[build-system]
6978
requires = ["hatchling"]
7079
build-backend = "hatchling.build"

packages/gooddata-fdw/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependency_groups =
1111
setenv =
1212
COVERAGE_CORE=sysmon
1313
commands =
14-
pytest -v --cov=src/gooddata_fdw --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
14+
pytest -v --cov --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
1515

1616
[testenv:docs]
1717
basepython = python3.14

packages/gooddata-flexconnect/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ allowed-unresolved-imports = ["jsonschema.**", "referencing"]
6767
[tool.hatch.build.targets.wheel]
6868
packages = ["src/gooddata_flexconnect"]
6969

70+
[tool.coverage.run]
71+
source = ["gooddata_flexconnect"]
72+
73+
[tool.coverage.paths]
74+
source = [
75+
"src/gooddata_flexconnect",
76+
"**/site-packages/gooddata_flexconnect",
77+
]
78+
7079
[build-system]
7180
requires = ["hatchling"]
7281
build-backend = "hatchling.build"

packages/gooddata-flexconnect/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependency_groups =
1111
setenv =
1212
COVERAGE_CORE=sysmon
1313
commands =
14-
pytest -v --cov=src/gooddata_flexconnect --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
14+
pytest -v --cov --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
1515

1616
[testenv:docs]
1717
basepython = python3.14

packages/gooddata-flight-server/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ allowed-unresolved-imports = [
7474
[tool.hatch.build.targets.wheel]
7575
packages = ["src/gooddata_flight_server"]
7676

77+
[tool.coverage.run]
78+
source = ["gooddata_flight_server"]
79+
80+
[tool.coverage.paths]
81+
source = [
82+
"src/gooddata_flight_server",
83+
"**/site-packages/gooddata_flight_server",
84+
]
85+
7786
[build-system]
7887
requires = ["hatchling"]
7988
build-backend = "hatchling.build"

packages/gooddata-flight-server/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependency_groups =
1111
setenv =
1212
COVERAGE_CORE=sysmon
1313
commands =
14-
pytest -v --cov=src/gooddata_flight_server --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
14+
pytest -v --cov --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
1515

1616
[testenv:docs]
1717
basepython = python3.14

0 commit comments

Comments
 (0)