Skip to content

Commit 19f494d

Browse files
committed
ci: run on the self-hosted runner; drop e2e suite
1 parent 60d851b commit 19f494d

5 files changed

Lines changed: 15 additions & 107 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,27 @@ name: Continuous Integration
33
on:
44
push:
55
branches:
6-
- '**'
6+
- main
77
pull_request:
8-
branches:
9-
- '**'
10-
workflow_dispatch:
118

129
jobs:
13-
unit-tests:
10+
checks:
1411
if: github.event.pull_request.draft == false
15-
runs-on: ${{ matrix.os }}
16-
17-
strategy:
18-
matrix:
19-
os: [ubuntu-latest]
20-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
21-
include:
22-
- os: macos-latest
23-
python-version: '3.12'
24-
- os: windows-latest
25-
python-version: '3.12'
26-
12+
runs-on: self-hosted
13+
container:
14+
image: python:3.12-slim
2715
steps:
2816
- name: Checkout code
2917
uses: actions/checkout@v4
3018

31-
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v5
33-
with:
34-
python-version: ${{ matrix.python-version }}
19+
- name: Install
20+
run: pip install -e ".[dev]"
3521

36-
- name: Install dependencies
37-
run: |
38-
python -m pip install --upgrade pip
39-
pip install -e ".[dev]"
22+
- name: Lint
23+
run: ruff check .
4024

41-
- name: Run lint check
42-
run: |
43-
ruff check .
25+
- name: Type check
26+
run: mypy
4427

45-
- name: Run type check
46-
run: |
47-
mypy
48-
49-
- name: Run unit tests
50-
run: |
51-
pytest tests
52-
53-
e2e-tests:
54-
# Runs only when manually dispatched (needs the stage API key secret).
55-
if: github.event_name == 'workflow_dispatch'
56-
runs-on: ubuntu-latest
57-
environment: e2e
58-
steps:
59-
- uses: actions/checkout@v4
60-
- uses: actions/setup-python@v5
61-
with:
62-
python-version: '3.12'
63-
- run: pip install -e ".[dev]"
64-
- name: Run e2e against stage
65-
env:
66-
DEEPINFRA_E2E: '1'
67-
DEEPINFRA_BASE_URL: https://stage.api.deepinfra.com
68-
DEEPINFRA_API_KEY: ${{ secrets.DEEPINFRA_STAGE_API_KEY }}
69-
run: pytest tests/e2e -v
28+
- name: Unit tests
29+
run: pytest tests

‎README.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,4 @@ can also point the official OpenAI client at
113113
pip install -e ".[dev]"
114114
pytest tests # unit tests (no network)
115115
mypy && ruff check . # types + lint
116-
117-
# e2e against a real deployment (creates and destroys sandboxes!)
118-
DEEPINFRA_E2E=1 DEEPINFRA_API_KEY=... pytest tests/e2e -v
119116
```

‎tests/e2e/__init__.py‎

Whitespace-only changes.

‎tests/e2e/test_stage_lifecycle.py‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

‎tests/test_client.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def test_missing_api_key_raises_with_hint(monkeypatch):
3838

3939

4040
def test_base_url_from_env(monkeypatch):
41-
monkeypatch.setenv("DEEPINFRA_BASE_URL", "https://stage.api.deepinfra.com/")
42-
assert DeepInfraClient("k").base_url == "https://stage.api.deepinfra.com"
41+
monkeypatch.setenv("DEEPINFRA_BASE_URL", "https://example.deepinfra.com/")
42+
assert DeepInfraClient("k").base_url == "https://example.deepinfra.com"
4343

4444

4545
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)