* Update tox.ini to document libmagic1 system dependency requirement * [CI] Consolidate test reports into single PR comment This change reduces noise in PR comments by combining multiple test reports (runner and sdk1) into a single consolidated comment. Changes: - Add combine-test-reports.sh script to merge test reports - Update CI workflow to combine reports before posting - Replace separate runner/sdk1 comment steps with single combined step - Summary section shows test counts (passed/failed/total) collapsed by default - Full detailed reports available in collapsible sections - Simplify job summary to use combined report Benefits: - Single PR comment instead of multiple separate comments - Cleaner PR comment section with less clutter - Easy-to-read summary with detailed inspection on demand - Maintains all existing test information 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix test count extraction in combine-test-reports script The previous version was using text pattern matching which incorrectly extracted test counts. This fix properly parses the pytest-md-report markdown table format by: - Finding the table header row to determine column positions - Locating the TOTAL row (handles both TOTAL and **TOTAL** formatting) - Extracting values from the passed, failed, and SUBTOTAL columns - Using proper table parsing instead of pattern matching This resolves the issue where the summary showed incorrect counts (23 for both runner and sdk1 instead of the actual 11 and 66). Fixes: Test count summary in PR comments now shows correct values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix LaTeX formatting in pytest-md-report test count extraction pytest-md-report wraps all table values in LaTeX formatting: $$\textcolor{...}{\tt{VALUE}}$$ The previous fix attempted to parse the table but didn't handle the LaTeX formatting, causing it to extract 0 for all counts. Changes: - Add strip_latex() function to extract values from LaTeX wrappers - Update grep pattern to match TOTAL row specifically (not SUBTOTAL in header) - Apply LaTeX stripping to all extracted values before parsing This fix was tested locally with tox-generated reports and correctly shows: Runner=11 passed, SDK1=66 passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
name: Run tox tests with UV
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- 'docker/**'
|
|
- 'frontend/**'
|
|
- 'docs/**'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
branches: [main]
|
|
paths-ignore:
|
|
- 'docker/**'
|
|
- 'frontend/**'
|
|
- 'docs/**'
|
|
|
|
jobs:
|
|
test:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
# Install a specific version of uv.
|
|
version: "0.6.14"
|
|
python-version: 3.12.9
|
|
|
|
- name: Cache tox environments
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .tox/
|
|
key: ${{ runner.os }}-tox-uv-${{ hashFiles('**/pyproject.toml', '**/tox.ini') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-tox-uv-
|
|
|
|
- name: Install tox with UV
|
|
run: uv pip install tox tox-uv
|
|
|
|
- name: Run tox
|
|
id: tox
|
|
run: |
|
|
tox
|
|
|
|
- name: Combine test reports
|
|
if: always() && (hashFiles('runner-report.md') != '' || hashFiles('sdk1-report.md') != '')
|
|
run: |
|
|
bash .github/scripts/combine-test-reports.sh
|
|
|
|
- name: Render combined test report to PR
|
|
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
|
|
if: always() && hashFiles('combined-test-report.md') != ''
|
|
with:
|
|
header: test-results
|
|
recreate: true
|
|
path: combined-test-report.md
|
|
|
|
- name: Output combined report to job summary
|
|
if: always() && hashFiles('combined-test-report.md') != ''
|
|
shell: bash
|
|
run: |
|
|
cat combined-test-report.md >> $GITHUB_STEP_SUMMARY
|