Skip to content

Fix publish workflow test failures by extracting reusable test infrastructure#7

Merged
BSd3v merged 5 commits into
mainfrom
copilot/fix-publish-test-flow
Nov 25, 2025
Merged

Fix publish workflow test failures by extracting reusable test infrastructure#7
BSd3v merged 5 commits into
mainfrom
copilot/fix-publish-test-flow

Conversation

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Tests pass in python-test.yml but fail in build.yml during publish because the build workflow lacked Chrome/chromedriver/XVFB setup required by Selenium tests.

Changes

  • Created .github/workflows/test-runner.yml: Reusable workflow encapsulating browser test infrastructure (Chrome, chromedriver, XVFB). Supports both source and distribution testing via test-distribution flag.

  • Refactored .github/workflows/build.yml: Removed inline test validation. Split into build job (creates artifacts) and validate job (delegates to test-runner with test-distribution: true).

  • Refactored .github/workflows/python-test.yml: Replaced duplicated test setup with calls to test-runner for Python 3.10 and 3.12. Extracted lint as separate job.

  • Security: Added explicit permissions: contents: read blocks per CodeQL recommendations.

Example Usage

# python-test.yml now simply calls the reusable workflow
jobs:
  test-python-310:
    uses: ./.github/workflows/test-runner.yml
    with:
      python-version: "3.10"
    secrets: inherit

# build.yml validates the built distribution
  validate:
    needs: build
    uses: ./.github/workflows/test-runner.yml
    with:
      python-version: ${{ inputs.python-version }}
      test-distribution: true
    secrets: inherit

This eliminates 56 lines of duplicated setup code while fixing the publish workflow.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix Publish / Test flow</issue_title>
<issue_description>Test keeps failing on the publish flow, but the tests work on the python-test flow for code reviews</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 25, 2025 12:25
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Copilot AI and others added 2 commits November 25, 2025 12:30
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests in publish flow Fix publish workflow test failures by extracting reusable test infrastructure Nov 25, 2025
Copilot AI requested a review from BSd3v November 25, 2025 12:34
@BSd3v BSd3v marked this pull request as ready for review November 25, 2025 13:34

@BSd3v BSd3v left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

💃

@BSd3v BSd3v merged commit 8c2112b into main Nov 25, 2025
6 checks passed
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.

Fix Publish / Test flow

2 participants