Skip to content

Commit 4e8892c

Browse files
committed
fixed truncation issues
1 parent 4382fcc commit 4e8892c

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
if [ -n "$TARGET_BRANCH" ]; then
6464
git fetch origin "$TARGET_BRANCH" --deepen=200 || true
6565
fi
66-
echo "matrix=$(python3 ci/get_package_shards.py)" >> $GITHUB_OUTPUT
66+
python3 ci/get_package_shards.py
6767
6868
unit:
6969
needs: initialize

ci/get_package_shards.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,10 @@ def group_packages(packages):
195195
if __name__ == "__main__":
196196
packages = get_packages_to_test()
197197
shards = group_packages(packages)
198-
print(json.dumps(shards))
198+
shards_json = json.dumps(shards)
199+
print(shards_json)
200+
201+
github_output = os.environ.get("GITHUB_OUTPUT")
202+
if github_output:
203+
with open(github_output, "a") as f:
204+
f.write(f"matrix={shards_json}\n")

ci/report_coverage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ report_package_coverage() {
7979

8080
# Generate report
8181
if [ -f ".coveragerc" ]; then
82-
echo "Using package-specific configuration: ${pkg}/.coveragerc" > "${pkg_log}"
82+
echo "Using package-specific configuration: ${pkg}/.coveragerc" >> "${pkg_log}"
8383
if grep -q "fail_under" ".coveragerc"; then
8484
COVERAGE_FILE="${pkg_coverage_db}" coverage report --rcfile=".coveragerc" --include="$PWD/**" >> "${pkg_log}" 2>&1
8585
else
8686
echo "No fail_under specified in ${pkg}/.coveragerc, enforcing default" >> "${pkg_log}"
8787
COVERAGE_FILE="${pkg_coverage_db}" coverage report --rcfile=".coveragerc" --include="$PWD/**" --fail-under="${DEFAULT_FAIL_UNDER}" >> "${pkg_log}" 2>&1
8888
fi
8989
else
90-
echo "No .coveragerc found for ${pkg}, enforcing default" > "${pkg_log}"
90+
echo "No .coveragerc found for ${pkg}, enforcing default" >> "${pkg_log}"
9191
COVERAGE_FILE="${pkg_coverage_db}" coverage report --include="$PWD/**" --fail-under="${DEFAULT_FAIL_UNDER}" >> "${pkg_log}" 2>&1
9292
fi
9393

0 commit comments

Comments
 (0)