diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml new file mode 100644 index 000000000..ae992c652 --- /dev/null +++ b/.github/workflows/ci-e2e.yml @@ -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 diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 3e0de0480..fc7491598 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -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: |