Skip to content

Handle empty example test collection in CI - #342

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/skip-rllib-without-optional-deps
Open

Handle empty example test collection in CI#342
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/skip-rllib-without-optional-deps

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep the test-examples workflow green when examples/ currently contains no pytest tests, while still running example tests when they exist.

The original failure reported in #316 involved the now-removed Gym/RLlib examples. Those directories were removed from main, but the workflow still runs pytest examples. On current main, pytest collects zero tests and exits with status 5, causing test-examples to fail for otherwise unrelated pull requests.

This change:

  • continues to run pytest examples
  • treats only pytest exit status 5 (NO_TESTS_COLLECTED) as success
  • propagates real collection and test failures
  • leaves the existing example lint and typecheck steps unchanged

Fixes #316.

Validation

Rebased onto current main as a single focused commit (6486ad478df064f16fa3443a3f7babfb889c1d28).

GitHub Actions on the rebased head:

  • test-examples: passed
  • CodeQL: passed
  • Google GitHub Admin Actions Workflow Security Scan: passed

The final diff changes only .github/workflows/test-examples.yml with 10 additions and 1 deletion.

@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review August 15, 2026 11:11
@jzleibo jzleibo self-assigned this Aug 16, 2026
@jzleibo

jzleibo commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

This looks good to me, but something seems to be blocking the merge, I'm not sure what the issue is. I'll ask around..

jzleibo
jzleibo previously approved these changes Aug 16, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Hi @jzleibo, just a quick follow-up on this. You mentioned you'd ask around about what was blocking the merge. The visible checks on the current head are all green and the PR is still mergeable from GitHub's side.

Have you heard anything about the remaining blocker?

Thanks again for taking a look.

@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix/skip-rllib-without-optional-deps branch from f2e19bc to 6486ad4 Compare August 23, 2026 13:36
@sylvesterkaczmarek sylvesterkaczmarek changed the title Exclude optional RLlib examples from core CI Handle empty example test collection in CI Aug 23, 2026
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.

Required test-examples CI check fails for RLlib examples due to missing optional dependencies

2 participants