Skip to content

chore(ci): fix coverage when modifying existing ported tests #2013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/scripts/parse_ported_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ WORKSPACE_PATH="${2:-$GITHUB_WORKSPACE}"

echo "Changed or new test files: $CHANGED_TEST_FILES"

# Extract ported_from markers
uv run fill $CHANGED_TEST_FILES --show-ported-from --clean --quiet --links-as-filled --skip-coverage-missed-reason --ported-from-output-file ported_from_files.txt
FILTERED_FILES=""
for file in $CHANGED_TEST_FILES; do
if git diff origin/main -- "$file" | grep -q "^+.*@pytest.mark.ported_from"; then
FILTERED_FILES="$FILTERED_FILES $file"
fi
done

if [[ -z "$FILTERED_FILES" ]]; then
echo "No new ported_from markers found."
echo "any_ported=false" >> "$GITHUB_OUTPUT"
exit 0
fi

uv run fill $FILTERED_FILES --show-ported-from --clean --quiet --links-as-filled --skip-coverage-missed-reason --ported-from-output-file ported_from_files.txt
files=$(cat ported_from_files.txt)
echo "Extracted converted tests:"
echo "$files"
Expand Down
Loading