Skip to content

Commit 8a16488

Browse files
committed
DRY for python CI tests
1 parent 40a0d8c commit 8a16488

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

.github/workflows/test-python.yml

+6-20
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
strategy:
1717
matrix:
1818
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
settings_module:
20+
[
21+
"test_app.settings_single_db",
22+
"test_app.settings_multi_db",
23+
]
1924
steps:
2025
- uses: actions/checkout@v4
2126
- uses: oven-sh/setup-bun@v2
@@ -28,26 +33,7 @@ jobs:
2833
- name: Install Python Dependencies
2934
run: pip install --upgrade pip hatch uv
3035
- name: Run Single DB Tests
31-
run: hatch test --python ${{ matrix.python-version }} --ds=test_app.settings_single_db -v
32-
33-
python-source-multi-db:
34-
runs-on: ubuntu-latest
35-
strategy:
36-
matrix:
37-
python-version: ["3.9", "3.10", "3.11", "3.12"]
38-
steps:
39-
- uses: actions/checkout@v4
40-
- uses: oven-sh/setup-bun@v2
41-
with:
42-
bun-version: latest
43-
- name: Use Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v5
45-
with:
46-
python-version: ${{ matrix.python-version }}
47-
- name: Install Python Dependencies
48-
run: pip install --upgrade pip hatch uv
49-
- name: Run Multi-DB Tests
50-
run: hatch test --python ${{ matrix.python-version }} --ds=test_app.settings_multi_db -v
36+
run: hatch test --python ${{ matrix.python-version }} --ds=${{matrix.settings_module}} -v
5137

5238
python-formatting:
5339
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)