-
Notifications
You must be signed in to change notification settings - Fork 268
Separate e2e tests from unit tests #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3cdffb8
refactor: update server initialization in E2E tests to pass API insta…
aniketmaurya 5be9533
Merge branch 'main' into migrate-litserver-args
aniketmaurya dce411b
Apply suggestions from code review
aniketmaurya e1b3546
refactor: enhance test fixtures and update test cases for LitServer
aniketmaurya db0ae72
update
aniketmaurya 9024043
refactor: update test cases to pass API classes directly to LitServer
aniketmaurya f502d58
fix
aniketmaurya a7da34d
feat: add port fixture for dynamic port assignment in tests
aniketmaurya aa180fd
feat: add E2E testing workflow to CI
aniketmaurya c8f7103
fix
aniketmaurya 0528405
Merge branch 'main' into aniket/separate-e2e
aniketmaurya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: E2E testing | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, "release/*"] | ||
| pull_request: | ||
| branches: [main, "release/*"] | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| pytester: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: ["ubuntu-latest"] | ||
| python-version: ["3.9", "3.10", "3.11"] | ||
| include: | ||
| - { os: "macos-latest", python-version: "3.11" } | ||
| - { os: "windows-latest", python-version: "3.11" } | ||
|
|
||
| timeout-minutes: 35 | ||
| env: | ||
| TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install uv and setup python | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| activate-environment: true | ||
| python-version: ${{ matrix.python-version }} | ||
| enable-cache: true | ||
|
|
||
| - name: Install package | ||
| run: | | ||
| uv sync --all-extras --dev | ||
| uv pip list | ||
|
|
||
| - name: Tests | ||
| timeout-minutes: 15 | ||
| run: | | ||
| pytest --cov=litserve src/ tests/e2e/ -v -s --durations=100 | ||
|
|
||
| - name: Statistics | ||
| run: | | ||
| coverage report | ||
| coverage xml | ||
|
|
||
| # e2e's are server-client tests via REST, so we don't need to upload coverage to Codecov | ||
| # - name: Upload coverage to Codecov | ||
| # uses: codecov/codecov-action@v5 | ||
| # with: | ||
| # token: ${{ secrets.CODECOV_TOKEN }} | ||
| # file: ./coverage.xml | ||
| # flags: unittests | ||
| # env_vars: OS,PYTHON | ||
| # name: codecov-umbrella | ||
| # fail_ci_if_error: false | ||
|
|
||
| tests-guardian: | ||
| runs-on: ubuntu-latest | ||
| needs: pytester | ||
| if: always() | ||
| steps: | ||
| - run: echo "${{ needs.pytester.result }}" | ||
| - name: failing... | ||
| if: needs.pytester.result == 'failure' | ||
| run: exit 1 | ||
| - name: cancelled or skipped... | ||
| if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result) | ||
| timeout-minutes: 1 | ||
| run: sleep 90 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?