Skip to content

Conversation

@aniketmaurya
Copy link
Collaborator

What does this PR do?

Devs will have faster CI experience since e2e tests takes a lot of time and unit tests can now can be run in parallel.

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

…nces directly

* Refactor E2E test files to create API instances with parameters before passing them to LitServer.
* This change improves clarity and consistency across the test suite by ensuring that API configurations are set up prior to server initialization.
* Adjustments made in multiple test files including default_async_streaming.py, default_batched_streaming.py, and others.
* Added new fixtures `simple_litapi_cls` and `simple_stream_cls` to return class instances of `SimpleLitAPI` and `SimpleStreamAPI`.
* Updated `test_litapi_with_stream` to utilize the new fixture for improved clarity.
* Refactored several test cases to directly pass API instances to `LitServer`, ensuring better configuration management.
* Adjusted assertions in context injection tests for consistency and clarity.
* Modified test cases to instantiate API classes before passing them to LitServer, enhancing clarity and consistency.
* Updated error handling in tests to ensure proper exception messages are raised.
* Refactored several tests to streamline setup and improve readability.
* Introduced a new pytest fixture `port` that generates a random port number between 10000 and 65535 for use in tests.
* Updated `test_workers_setup_status` to utilize the new `port` fixture, enhancing test flexibility and avoiding port conflicts.
* Introduced a new GitHub Actions workflow for end-to-end (E2E) testing, triggered on pushes and pull requests to the main and release branches.
* Configured jobs to run tests across multiple Python versions and operating systems, including Ubuntu, macOS, and Windows.
* Integrated coverage reporting and upload to Codecov for better test visibility.
* Updated existing CI testing workflow to exclude E2E tests from unit test runs.
@codecov
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85%. Comparing base (103a1cf) to head (0528405).
Report is 3 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #580   +/-   ##
===================================
  Coverage    85%    85%           
===================================
  Files        39     39           
  Lines      2989   2989           
===================================
  Hits       2536   2536           
  Misses      453    453           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
Copy link
Collaborator

Choose a reason for hiding this comment

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

How much does the workflow differ? Could it be just one additional parameter/switch?

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.

2 participants