Skip to content

Allow empty pytest collection in CI test workflow - #6

Merged
bobby404-K merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Sep 11, 2026
Merged

bobby404-K merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The test GitHub Actions job was failing even when repository state was valid because pytest exits with code 5 when no tests are collected. This change updates the workflow to treat that specific exit code as non-failing so the job can proceed to notebook execution.

  • Root cause

    • pytest in .github/workflows/tests.yml failed the job on exit code 5 (collected 0 items), which is not a test failure.
  • Workflow change

    • Updated the Python test step to accept exit code 5 while preserving failure behavior for all other non-zero exits.
  • Resulting behavior

    • CI still fails on real test errors.
    • CI no longer fails solely because no pytest tests exist yet.
- name: Run Python tests
  run: |
    pytest || test $? -eq 5

Co-authored-by: bobby404-K <191977924+bobby404-K@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job test Allow empty pytest collection in CI test workflow Sep 11, 2026
Copilot AI requested a review from bobby404-K September 11, 2026 05:54

@bobby404-K bobby404-K 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.

ok

@bobby404-K
bobby404-K marked this pull request as ready for review September 11, 2026 05:54
Copilot AI lite review requested due to automatic review settings September 11, 2026 05:54
@bobby404-K
bobby404-K merged commit e50159a into main Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped and preserves real test failures.

Pull request overview

Updates the CI test workflow so an empty pytest collection does not fail the job.

Changes:

  • Accepts pytest exit code 5.
  • Preserves failures for other non-zero exits.
File summaries
File Description
.github/workflows/tests.yml Adjusts pytest exit-code handling.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants