Skip to content

Commit 32b819d

Browse files
committed
split out elasticsearch
1 parent c9fcfc4 commit 32b819d

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ env:
1515
FORCE_COLOR: "1"
1616

1717
jobs:
18-
run:
18+
test:
1919
name: Python ${{ matrix.python-version }} - ${{ matrix.cdist-group }}/3
2020
runs-on: ubuntu-latest
21-
timeout-minutes: 30
21+
timeout-minutes: 10
2222
strategy:
2323
fail-fast: false
2424
matrix:
@@ -45,11 +45,11 @@ jobs:
4545

4646
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
4747
name: Run tests with coverage tracking
48-
run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3
48+
run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3 -k "not elasticsearch"
4949

5050
- if: matrix.python-version != '3.12' || runner.os != 'Linux'
5151
name: Run tests without tracking coverage
52-
run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3
52+
run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3 -k "not elasticsearch"
5353

5454
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
5555
uses: actions/upload-artifact@v4
@@ -63,6 +63,27 @@ jobs:
6363
with:
6464
token: ${{ secrets.CODECOV_TOKEN }}
6565
slug: litestar-org/pytest-databases
66+
67+
# run elasticsearch in a separate step. it's too slow
68+
test_elasticsearch:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- name: Set up Python
74+
uses: actions/setup-python@v5
75+
with:
76+
python-version: 3.9
77+
78+
- name: Install uv
79+
uses: astral-sh/setup-uv@v5
80+
81+
- name: Intall dependencies
82+
run: uv sync --frozen
83+
84+
- name: Run tests with coverage tracking
85+
run: uv run pytest -k elasticsearch
86+
6687
sonar:
6788
needs:
6889
- run

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ markers = [
339339
]
340340
testpaths = ["tests"]
341341
cdist-justify-items = "file"
342+
cdist-group-steal = "3:10"
342343

343344
[tool.coverage.run]
344345
branch = true

0 commit comments

Comments
 (0)