1
+ name : Test / watsonx
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 0 * * *"
6
+ pull_request :
7
+ paths :
8
+ - " integrations/watsonx/**"
9
+ - " !integrations/watsonx/*.md"
10
+ - " .github/workflows/watsonx.yml"
11
+
12
+ defaults :
13
+ run :
14
+ working-directory : integrations/watsonx
15
+
16
+ concurrency :
17
+ group : watsonx-${{ github.head_ref }}
18
+ cancel-in-progress : true
19
+
20
+ env :
21
+ PYTHONUNBUFFERED : " 1"
22
+ FORCE_COLOR : " 1"
23
+ WATSONX_API_KEY : ${{ secrets.WATSONX_API_KEY }}
24
+ WATSONX_PROJECT_ID : ${{ secrets.WATSONX_PROJECT_ID }}
25
+
26
+ jobs :
27
+ run :
28
+ name : Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
29
+ runs-on : ${{ matrix.os }}
30
+ strategy :
31
+ fail-fast : false
32
+ matrix :
33
+ os : [ubuntu-latest] # Start with Linux only, add others later
34
+ python-version : ["3.9", "3.10", "3.11", "3.12"] # Watsonx supported versions
35
+
36
+ steps :
37
+ - uses : actions/checkout@v4
38
+
39
+ - name : Set up Python ${{ matrix.python-version }}
40
+ uses : actions/setup-python@v5
41
+ with :
42
+ python-version : ${{ matrix.python-version }}
43
+
44
+ - name : Install Hatch
45
+ run : pip install --upgrade hatch
46
+
47
+ - name : Install dependencies
48
+ run : hatch env create
49
+
50
+ - name : Lint
51
+ if : matrix.python-version == '3.9' && runner.os == 'Linux'
52
+ run : hatch run lint
53
+
54
+ - name : Run tests
55
+ run : hatch run test
56
+
57
+ - name : Run unit tests with lowest direct dependencies
58
+ run : |
59
+ hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
60
+ hatch run uv pip install -r requirements_lowest_direct.txt
61
+ hatch run test:unit
62
+
63
+ - name : Nightly - run tests with Haystack main
64
+ if : github.event_name == 'schedule'
65
+ run : |
66
+ hatch env prune
67
+ hatch run uv pip install git+https://github.com/deepset-ai/haystack.git@main
68
+ hatch run test
0 commit comments