Skip to content

Commit a190479

Browse files
ci: isolate db2 testing into dedicated workflow
- Remove db2 from make install-dev to avoid forcing db2-sqlglot-dialect installation during standard dev setup - Remove db2 from engine-tests-docker matrix in pr.yaml - Add dedicated .github/workflows/db2.yaml workflow triggered when Db2 files change Signed-off-by: IBM Db2 Eco System <Hdm-dev-persona-db2-eco-system@ibm.com>
1 parent 462c797 commit a190479

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

‎.github/workflows/db2.yaml‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: db2
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'sqlmesh/core/engine_adapter/db2.py'
9+
- 'tests/core/engine_adapter/test_db2.py'
10+
- 'tests/core/engine_adapter/integration/test_integration_db2.py'
11+
- 'tests/core/engine_adapter/integration/docker/compose.db2.yaml'
12+
- '.github/workflows/db2.yaml'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- 'sqlmesh/core/engine_adapter/db2.py'
18+
- 'tests/core/engine_adapter/test_db2.py'
19+
- 'tests/core/engine_adapter/integration/test_integration_db2.py'
20+
- 'tests/core/engine_adapter/integration/docker/compose.db2.yaml'
21+
- '.github/workflows/db2.yaml'
22+
23+
concurrency:
24+
group: db2-${{ github.event.pull_request.number || github.sha }}
25+
cancel-in-progress: true
26+
27+
permissions:
28+
contents: read
29+
30+
jobs:
31+
db2-test:
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 25
34+
env:
35+
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
36+
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: '1'
37+
UV: '1'
38+
steps:
39+
- uses: actions/checkout@v7
40+
- name: Set up Python
41+
uses: actions/setup-python@v7
42+
with:
43+
python-version: '3.12'
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v7
46+
- name: Install SQLMesh dev dependencies
47+
run: |
48+
uv venv .venv
49+
source .venv/bin/activate
50+
make install-dev
51+
- name: Install OS-level dependencies
52+
run: ./.github/scripts/install-prerequisites.sh "db2"
53+
- name: Run tests
54+
run: |
55+
source .venv/bin/activate
56+
make db2-test
57+
- name: Upload test results
58+
uses: actions/upload-artifact@v7
59+
if: ${{ !cancelled() }}
60+
with:
61+
name: test-results-docker-db2
62+
path: test-results/
63+
retention-days: 7

‎.github/workflows/pr.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ jobs:
266266
clickhouse,
267267
risingwave,
268268
starrocks,
269-
db2,
270269
]
271270
env:
272271
PYTEST_XDIST_AUTO_NUM_WORKERS: 2

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ else
1414
endif
1515

1616
install-dev:
17-
$(PIP) install -e ".[dev,web,slack,dlt,lsp,db2]" ./examples/custom_materializations
17+
$(PIP) install -e ".[dev,web,slack,dlt,lsp]" ./examples/custom_materializations
1818

1919
install-doc:
2020
$(PIP) install -r ./docs/requirements.txt

0 commit comments

Comments
 (0)