Skip to content
Closed
76 changes: 76 additions & 0 deletions .github/workflows/ci-e2e.yml
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:
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?

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
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Tests
timeout-minutes: 15
run: |
pytest --cov=litserve src/ tests/ -v -s --durations=100
pytest --cov=litserve src/ tests/ -v -s --durations=100 -m "not e2e"

- name: Statistics
run: |
Expand Down
Loading