Skip to content

Conversation

@cdecker
Copy link
Member

@cdecker cdecker commented Dec 9, 2025

Summary

Consolidates GLOBAL_PYTEST_OPTS and PYTEST_OPTS_BASE into a single PYTEST_OPTS_BASE variable that includes all common pytest options.

Changes

  • Replaced GLOBAL_PYTEST_OPTS with PYTEST_OPTS_BASE containing:

    • --reruns=10 - Retry flaky tests
    • -vvv - Verbose output
    • --junit-xml=report.xml - JUnit XML test reporting
    • --timeout=1800 - 30-minute timeout (unified from mixed 1200/1800)
    • --durations=10 - Show 10 slowest tests
  • Simplified job configurations by removing redundant option specifications from 6 jobs

  • Cleaned up pytest command invocations by removing direct ${GLOBAL_PYTEST_OPTS} references (now inherited via ${PYTEST_OPTS})

  • Removed duplicate -vvv flags from command lines

Benefits

  • Single source of truth for common pytest options
  • Consistent test configuration across all CI jobs
  • Easier to maintain and modify pytest options globally
  • Cleaner, more readable workflow configuration

Test plan

  • Verify CI workflow runs successfully with new configuration
  • Confirm JUnit XML reports are generated
  • Check that all pytest runs include the expected options

Replaces GLOBAL_PYTEST_OPTS with PYTEST_OPTS_BASE that includes all
common pytest options: --reruns=10, -vvv, --junit-xml=report.xml,
--timeout=1800, and --durations=10.

Removes redundant option specifications from individual jobs and
simplifies pytest command invocations by removing direct references
to GLOBAL_PYTEST_OPTS (now inherited via PYTEST_OPTS).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changelog-None
@cdecker cdecker force-pushed the 202511-pytext-reprot branch from 8157c66 to 53af664 Compare December 9, 2025 16:58
cdecker and others added 2 commits December 9, 2025 18:00
Adds upload-artifact steps after each test run to preserve test
results as GitHub artifacts. Each job uploads its report.xml with
a unique name based on the job and matrix configuration.

Artifacts are uploaded even when tests fail (if: always()) to
ensure test results are available for debugging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
GitHub Actions doesn't allow referencing workflow-level env variables
from job-level env sections. Fixed by:
- Replacing ${{ env.PYTEST_OPTS_BASE }} with full values in job-level env
- Keeping ${{ env.PYTEST_OPTS_BASE }} in step-level env (which is valid)

This resolves the "Unrecognized named-value: 'env'" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant