1+ # This workflow comes from https://github.com/ofek/hatch-mypyc
2+ # https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml
3+ name : Test / aimlapi
4+
5+ on :
6+ schedule :
7+ - cron : " 0 0 * * *"
8+ pull_request :
9+ paths :
10+ - " integrations/aimlapi/**"
11+ - " !integrations/aimlapi/*.md"
12+ - " .github/workflows/aimlapi.yml"
13+
14+ defaults :
15+ run :
16+ working-directory : integrations/aimlapi
17+
18+ concurrency :
19+ group : aimlapi-${{ github.head_ref }}
20+ cancel-in-progress : true
21+
22+ env :
23+ PYTHONUNBUFFERED : " 1"
24+ FORCE_COLOR : " 1"
25+ AIMLAPI_API_KEY : ${{ secrets.AIMLAPI_API_KEY }}
26+
27+ jobs :
28+ run :
29+ name : Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
30+ runs-on : ${{ matrix.os }}
31+ strategy :
32+ fail-fast : false
33+ matrix :
34+ os : [ubuntu-latest, windows-latest, macos-latest]
35+ python-version : ["3.9", "3.13"]
36+
37+ steps :
38+ - name : Support longpaths
39+ if : matrix.os == 'windows-latest'
40+ working-directory : .
41+ run : git config --system core.longpaths true
42+
43+ - uses : actions/checkout@v5
44+
45+ - name : Set up Python ${{ matrix.python-version }}
46+ uses : actions/setup-python@v6
47+ with :
48+ python-version : ${{ matrix.python-version }}
49+
50+ - name : Install Hatch
51+ run : pip install --upgrade hatch
52+
53+ - name : Lint
54+ if : matrix.python-version == '3.9' && runner.os == 'Linux'
55+ run : hatch run fmt-check && hatch run test:types
56+
57+ - name : Generate docs
58+ if : matrix.python-version == '3.9' && runner.os == 'Linux'
59+ run : hatch run docs
60+
61+ - name : Run tests
62+ run : hatch run test:cov-retry
63+
64+ - name : Run unit tests with lowest direct dependencies
65+ run : |
66+ hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
67+ hatch run uv pip install -r requirements_lowest_direct.txt
68+ hatch run test:unit
69+
70+ # Since this integration inherits from OpenAIChatGenerator, we run ALL tests with Haystack main branch to catch regressions
71+ - name : Nightly - run tests with Haystack main branch
72+ if : github.event_name == 'schedule'
73+ run : |
74+ hatch env prune
75+ hatch run uv pip install git+https://github.com/deepset-ai/haystack.git@main
76+ hatch run test:all
77+
78+ - name : Send event to Datadog for nightly failures
79+ if : failure() && github.event_name == 'schedule'
80+ uses : ./.github/actions/send_failure
81+ with :
82+ title : |
83+ Core integrations nightly tests failure: ${{ github.workflow }}
84+ api-key : ${{ secrets.CORE_DATADOG_API_KEY }}
0 commit comments