Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[run]
source = src.cli_code
include =
*/src/cli_code/tools/test_runner.py
*/src/cli_code/models/gemini.py
omit =
*/.rules/*
*/.venv/*
Comment on lines 3 to 5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding a comment explaining why the include section was removed. This can help future developers understand the reasoning behind the change and prevent accidental reintroduction of the section.

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ jobs:
run: |
# Set CI variables
export CI_TEST_TIMEOUT=120
export CI_EXIT_ON_TEST_FAILURE=0
export CI_EXIT_ON_TEST_FAILURE=1

# Run directly without using bash to make error handling clearer
bash -ex ./scripts/run_coverage_ci.sh || echo "Coverage generation had errors but we'll continue"

# Generate dummy coverage if needed
if [ ! -f "coverage.xml" ]; then
echo "Creating placeholder coverage.xml file"
echo '<?xml version="1.0" ?><coverage version="7.3.2" timestamp="1713166921" lines-valid="100" lines-covered="85" line-rate="0.85" branches-valid="0" branches-covered="0" branch-rate="0" complexity="0"><sources><source>/Users/runner/work/cli-code/cli-code/src</source></sources><packages><package name="cli_code" line-rate="0.85" branch-rate="0" complexity="0"><classes><class name="__init__.py" filename="cli_code/__init__.py" complexity="0" line-rate="0.85" branch-rate="0"></class></classes></package></packages></coverage>' > coverage.xml
# Extract actual coverage percentage from XML file
if [ -f "coverage.xml" ]; then
COVERAGE=$(python -c "import xml.etree.ElementTree as ET; tree = ET.parse('coverage.xml'); root = tree.getroot(); line_rate = float(root.attrib['line-rate'])*100; print('{:.2f}%'.format(line_rate))")
echo "percentage=$COVERAGE" >> $GITHUB_OUTPUT
else
echo "Warning: No coverage.xml file was generated"
echo "percentage=0.00%" >> $GITHUB_OUTPUT
fi

# Set a fixed coverage percentage for PR comment
echo "percentage=85.00%" >> $GITHUB_OUTPUT

- name: Comment PR with code coverage
if: github.event_name == 'pull_request'
Expand Down
23 changes: 0 additions & 23 deletions pr_description.md

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/run_coverage_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo "Starting coverage generation for CI..."
mkdir -p coverage_html

# Set environment variables for CI
export CI_EXIT_ON_TEST_FAILURE=0 # Don't exit on test failures in CI
export CI_EXIT_ON_TEST_FAILURE=1 # Exit on test failures to ensure code quality
export CI_TEST_TIMEOUT=60 # Default timeout

# Special handling for GitHub Actions environment
Expand Down